|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--openjava.ptree.ParseTreeObject | +--openjava.ptree.NonLeaf
The NonLeaf class presents for node of parse tree.
ParseTree
,
Leaf
Field Summary | |
private String |
comment
|
private Object[] |
contents
contents is the array of the elements of this nonleaf-node. |
Fields inherited from class openjava.ptree.ParseTreeObject |
debugFlag, debugLevel, LN, out, writerStack |
Constructor Summary | |
NonLeaf()
Allocates a new non-leaf(cons-cell), where the first element has null and the second element has null. |
Method Summary | |
void |
childrenAccept(ParseTreeVisitor visitor)
Accepts a ParseTreeVisitor object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern. |
protected boolean |
childrenAreEqual(NonLeaf p)
Returns whether all of this object's children are equal to the corresponding child of other |
protected Object |
elementAt(int i)
Returns the specified element at the specified point of this nonleaf-node. |
boolean |
equals(ParseTree p)
Tests if this nonleaf-node's value equals to the specified ptree-node's. |
String |
getComment()
Obtains the comment of javadoc format which explains this declaration. |
Object[] |
getContents()
Gets the contents of this nonleaf-node. |
protected int |
getLength()
getLength() returns the length of this nonleaf-node |
OJClass |
getRowType(Environment env)
|
ParseTree |
makeRecursiveCopy()
Makes a new copy (another object) of this nonleaf-node recursively. |
protected void |
replaceChildWith(ParseTree dist,
ParseTree replacement)
|
protected void |
set(Object p)
Makes this ptree a list presenting for [ p ] |
protected void |
set(Object[] ptrees)
Makes this ptree a list presenting for [ p ] |
protected void |
set(Object p0,
Object p1)
Makes this ptree a list presenting for [ p0 p1 ] |
protected void |
set(Object p0,
Object p1,
Object p2)
Makes this ptree a list presenting for [ p0 p1 p2 ] |
protected void |
set(Object p0,
Object p1,
Object p2,
Object p3)
Makes this ptree a list presenting for [ p0 p1 p2 p3 ] |
protected void |
set(Object p0,
Object p1,
Object p2,
Object p3,
Object p4)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 ] |
protected void |
set(Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 ] |
protected void |
set(Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 p6 ] |
protected void |
set(Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6,
Object p7)
Makes this ptree a list presenting for [ p0 p1 p2 p3 p4 p5 p6 p7 ] |
void |
setComment(String comment)
Sets the comment of javadoc format which explains this declaration. |
protected void |
setElementAt(Object p,
int i)
Sets the specified element at the specified point of this nonleaf-node. |
void |
writeCode()
Deprecated. |
Methods inherited from class openjava.ptree.ParseTreeObject |
accept, clone, eq, eq, equal, flushPrintWriter, getDebugFlag, getNest, getObjectID, getParent, getPrintWriter, getTab, hashCode, lastObjectID, makeCopy, popNest, popPrintWriter, pushNest, pushPrintWriter, replace, setDebugFlag, setDebugLevel, setNest, setParent, setPrintStream, setTab, toFlattenString, toString, writeDebug, writeDebugL, writeDebugLln, writeDebugln, writeDebugLR, writeDebugR, writeDebugRln, writeTab |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface openjava.ptree.ParseTree |
accept, eq, getObjectID, makeCopy, replace, toFlattenString, toString |
Field Detail |
private String comment
private Object[] contents
Constructor Detail |
public NonLeaf()
Method Detail |
protected final void replaceChildWith(ParseTree dist, ParseTree replacement) throws ParseTreeException
replaceChildWith
in class ParseTreeObject
ParseTreeException
public ParseTree makeRecursiveCopy()
makeRecursiveCopy
in interface ParseTree
makeRecursiveCopy
in class ParseTreeObject
public boolean equals(ParseTree p)
equals
in interface ParseTree
equals
in class ParseTreeObject
protected boolean childrenAreEqual(NonLeaf p)
other
protected void set(Object[] ptrees)
ptrees
- list's elementprotected void set(Object p)
p
- list's elementprotected void set(Object p0, Object p1)
p0
- list's elementp1
- list's elementprotected void set(Object p0, Object p1, Object p2)
p0
- list's elementp1
- list's elementp2
- list's elementprotected void set(Object p0, Object p1, Object p2, Object p3)
p0
- list's elementp1
- list's elementp2
- list's elementp3
- list's elementprotected void set(Object p0, Object p1, Object p2, Object p3, Object p4)
p0
- list's elementp1
- list's elementp2
- list's elementp3
- list's elementp4
- list's elementprotected void set(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5)
p0
- list's elementp1
- list's elementp2
- list's elementp3
- list's elementp4
- list's elementprotected void set(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6)
p0
- list's elementp1
- list's elementp2
- list's elementp3
- list's elementp4
- list's elementp5
- list's elementp6
- list's elementprotected void set(Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)
p0
- list's elementp1
- list's elementp2
- list's elementp3
- list's elementp4
- list's elementp5
- list's elementp6
- list's elementp7
- list's elementpublic void writeCode()
writeCode
in interface ParseTree
writeCode
in class ParseTreeObject
protected Object elementAt(int i)
i
- index
protected void setElementAt(Object p, int i)
p
- ptree object to seti
- indexpublic Object[] getContents()
protected int getLength()
public void setComment(String comment)
comment
- the Comment object to setpublic String getComment()
public void childrenAccept(ParseTreeVisitor visitor) throws ParseTreeException
ParseTreeVisitor
object as the role of a
Visitor in the Visitor pattern, as the role of an Element in the
Visitor pattern.
This invoke an appropriate visit()
method on each
child ParseTree
object with this visitor.
childrenAccept
in interface ParseTree
childrenAccept
in class ParseTreeObject
visitor
- a visitor
ParseTreeException
public OJClass getRowType(Environment env) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |