Node
JexlNode
public class SimpleNode extends java.lang.Object implements Node
Modifier and Type | Field | Description |
---|---|---|
protected JexlNode[] |
children |
The array of children nodes.
|
protected int |
id |
The node type id.
|
protected JexlNode |
parent |
The parent node.
|
protected java.lang.Object |
value |
volatile value so it can be used as a last evaluation cache.
|
Constructor | Description |
---|---|
SimpleNode(int i) |
Creates a SimpleNode instance.
|
SimpleNode(Parser p,
int i) |
Creates a SimpleNode instance.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
childrenAccept(ParserVisitor visitor,
java.lang.Object data) |
Accept the visitor on all this node's children.
|
void |
dump(java.lang.String prefix) |
|
int |
getId() |
|
java.lang.Object |
jjtAccept(ParserVisitor visitor,
java.lang.Object data) |
Accept the visitor.
|
void |
jjtAddChild(Node n,
int i) |
Adds a child node.
|
void |
jjtClose() |
This method is called after all the child nodes have been
added.
|
JexlNode |
jjtGetChild(int i) |
Gets a child of this node.
|
int |
jjtGetNumChildren() |
Gets this node number of children.
|
JexlNode |
jjtGetParent() |
Gets this node's parent.
|
java.lang.Object |
jjtGetValue() |
Gets this node value.
|
void |
jjtOpen() |
This method is called after the node has been made the current
node.
|
void |
jjtSetParent(Node n) |
Sets this node's parent.
|
void |
jjtSetValue(java.lang.Object value) |
Sets this node value.
|
java.lang.String |
toString() |
|
java.lang.String |
toString(java.lang.String prefix) |
protected final int id
protected volatile java.lang.Object value
public SimpleNode(int i)
i
- the node type identifierpublic SimpleNode(Parser p, int i)
p
- the parser instancei
- the node type identifierpublic void jjtOpen()
public void jjtClose()
public void jjtSetParent(Node n)
jjtSetParent
in interface Node
n
- the parentpublic JexlNode jjtGetParent()
jjtGetParent
in interface Node
public void jjtAddChild(Node n, int i)
jjtAddChild
in interface Node
n
- the child nodei
- the child offsetpublic JexlNode jjtGetChild(int i)
jjtGetChild
in interface Node
i
- the child offsetpublic int jjtGetNumChildren()
jjtGetNumChildren
in interface Node
public void jjtSetValue(java.lang.Object value)
value
- public java.lang.Object jjtGetValue()
public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
public java.lang.Object childrenAccept(ParserVisitor visitor, java.lang.Object data)
visitor
- the visitordata
- contextual datapublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String prefix)
public void dump(java.lang.String prefix)