|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.syntax.parser.CSTNode
Node in the concrete syntax tree.
Parser
,
Token
Field Summary | |
static CSTNode[] |
EMPTY_ARRAY
|
Constructor Summary | |
CSTNode()
Initializes the node with token set to null . |
|
CSTNode(Token token)
Initializes the node with the specified token. |
Method Summary | |
void |
addChild(CSTNode node)
Appends a child node to the child list. |
java.util.Iterator |
childIterator()
Returns an Iterator on the child list. |
int |
children()
Returns the number of children. |
java.lang.String |
dump()
Generates the pretty-printed representation of the node returned by toString . |
protected java.lang.String |
dump(java.lang.String indent)
Does the actual work of generating the pretty-printing for this node. |
CSTNode |
getChild(int index)
Returns the child at the specified index. |
CSTNode[] |
getChildren()
Returns an array of all children. |
Token |
getToken()
Returns the token set on construction, or null. |
boolean |
isEmpty()
Returns true if the node is empty (no token, no children). |
void |
setToken(Token value)
Changes the token set on construction. |
java.lang.String |
toString()
Returns a pretty-printed representation of the node, including all descendents. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final CSTNode[] EMPTY_ARRAY
Constructor Detail |
public CSTNode()
null
.
public CSTNode(Token token)
Method Detail |
public Token getToken()
public void setToken(Token value)
public boolean isEmpty()
public void addChild(CSTNode node)
public CSTNode getChild(int index)
public CSTNode[] getChildren()
public int children()
public java.util.Iterator childIterator()
Iterator
on the child list.
public java.lang.String toString()
public java.lang.String dump()
toString
.
protected java.lang.String dump(java.lang.String indent)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |