public interface Node
extends java.io.Serializable
Declaration
, Expression
and OrderingExpression.
Modifier and Type | Method and Description |
---|---|
void |
arrive(NodeVisitor visitor)
This method is called by the tree walker when this node is walked
but its children have not been walked yet.
|
Node[] |
getChildren()
Returns this node's children.
|
java.lang.Class |
getJavaClass()
Returns the Java type of this node.
|
java.lang.Object |
getObject()
Returns the user object.
|
Node |
getParent()
Returns this node's parent node.
|
int |
getTokenType()
Returns the token type of this node.
|
java.lang.Object |
leave(NodeVisitor visitor,
java.lang.Object[] results)
This method is called by the tree walker when this node is walked
and all of its children have been walked.
|
void |
setObject(java.lang.Object object)
Sets the user object.
|
void |
setParent(Node parent)
Sets the parent of this node.
|
boolean |
walkNextChild(NodeVisitor visitor,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
This method is called by the tree walker after walking each child
except the last child.
|
java.lang.Object getObject()
void setObject(java.lang.Object object)
object
- the user objectNode getParent()
void setParent(Node parent)
parent
- the parent nodeNode[] getChildren()
java.lang.Class getJavaClass()
int getTokenType()
void arrive(NodeVisitor visitor)
visitor
.visitor
- the node visitorjava.lang.Object leave(NodeVisitor visitor, java.lang.Object[] results)
visitor
.
The argument results
contains the result instances
returned by all leave
methods of this node's children.
This method returns the result instance of the delegation call
of the argument visitor
.visitor
- the node visitorresults
- the result array containing result instances of
this node's childrenvisitor
boolean walkNextChild(NodeVisitor visitor, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
visitor
. The argument
resultOfPreviousChild
contains the result instance
returned by the leave
method of the last walked
child. The argument
indicates the index of the
next child in the children array returned by method
getChildren
. If this method returns
false
then the tree walker does not walk any more
children of this node. Instead, it calls method
leave
immediately.visitor
- the node visitorresultOfPreviousChild
- the result computed by leaving the
previous child nodeindexOfNextChild
- the index in the children array of the
next child to walkfalse
if remaining children should not be walkedCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.