public class SimpleNode extends Object implements Node
Modifier and Type | Field and Description |
---|---|
protected JexlNode[] |
children
The array of children nodes.
|
protected int |
id
The node type id.
|
protected JexlNode |
parent
The parent node.
|
protected Object |
value
volatile value so it can be used as a last evaluation cache.
|
Constructor and Description |
---|
SimpleNode(int i)
Creates a SimpleNode instance.
|
SimpleNode(Parser p,
int i)
Creates a SimpleNode instance.
|
Modifier and Type | Method and Description |
---|---|
Object |
childrenAccept(ParserVisitor visitor,
Object data)
Accept the visitor on all this node's children.
|
void |
dump(String prefix) |
Object |
jjtAccept(ParserVisitor visitor,
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.
|
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(Object value)
Sets this node value.
|
String |
toString() |
String |
toString(String prefix) |
protected JexlNode parent
protected JexlNode[] children
protected final int id
protected volatile 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(Object value)
value
- public Object jjtGetValue()
public Object jjtAccept(ParserVisitor visitor, Object data)
public Object childrenAccept(ParserVisitor visitor, Object data)
visitor
- the visitordata
- contextual datapublic void dump(String prefix)
Copyright © 2016 Internet2. All rights reserved.