|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A node of the abstract syntax tree that is the result of parsing.
TopLevelClass.Type
,
TopLevelClass.Token
,
TopLevelClass.parseType(java.io.File)
Method Summary | |
void |
accept(TopLevelClass.Visitor visitor)
Deprecated. This method will be replaced by TopLevelClass.Visitor.visitAll(TopLevelClass.Node) . |
List |
getChildNodes()
Returns the list of the child nodes of this .
|
TopLevelClass.Node |
getParentNode()
Returns the parent node of this , or null if this node is the root of the tree.
|
void |
setParentNode(TopLevelClass.Node parentNode)
Sets the result of getParentNode() .
|
Method Detail |
public List getChildNodes()
this
.
For a Node created by the program generated by ¬<><∪∪, the list should be modifiable and the nodes should be ordered by its position in the parsed text. However, the nodes constructed by the users of ¬<><∪∪ are not required to satisfy it.
this
.
public void accept(TopLevelClass.Visitor visitor)
TopLevelClass.Visitor.visitAll(TopLevelClass.Node)
.
this
node.
this
node is passed to the visitor
,
then the child nodes are traversed recursively (preorder traversal).
A node is passed to the methods of the visitor
, using reflection,
that is public, whose name is visit
,
that have only one argument whose type is compatible with this
node,
and that have no throws clause.
visitor
- a visitor.
public TopLevelClass.Node getParentNode()
this
, or null if this
node is the root of the tree.
This method simply returns the value the method setParentNode(TopLevelClass.Node)
set, so the above specification should be maintained by the users of this
object.
this
, or null if and only if this
node is the root of the tree.
public void setParentNode(TopLevelClass.Node parentNode)
getParentNode()
.
parentNode
- the value getParentNode()
returns.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |