Interface Node
-
- All Known Implementing Classes:
ASTArray,ASTBlock,ASTBoolScalar,ASTDirective,ASTExpression,ASTFloatScalar,ASTIfElse,ASTIntScalar,ASTMethod,ASTStringScalar,ASTText,ASTVariable,IdentifierNode,ScalarNode,SimpleNode
public interface NodeAll AST nodes must implement this interface. It provides basic machinery for constructing the parent and child relationships between nodes.- Since:
- 4.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidevaluate(Context context)voidjjtAddChild(Node n, int i)This method tells the node to add its argument to the node's list of children.NodejjtGetChild(int i)This method returns a child node.intjjtGetNumChildren()Return the number of children the node has.NodejjtGetParent()voidjjtSetParent(Node n)This pair of methods are used to inform the node of its parent.
-
-
-
Method Detail
-
jjtSetParent
void jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent.
-
jjtGetParent
Node jjtGetParent()
-
jjtAddChild
void jjtAddChild(Node n, int i)
This method tells the node to add its argument to the node's list of children.
-
jjtGetChild
Node jjtGetChild(int i)
This method returns a child node. The children are numbered from zero, left to right.
-
jjtGetNumChildren
int jjtGetNumChildren()
Return the number of children the node has.
-
evaluate
void evaluate(Context context)
-
-