org.apache.commons.jexl.parser
public class SimpleNode extends Object implements Node
Version: $Id: SimpleNode.java 398328 2006-04-30 12:46:59Z dion $
Field Summary | |
---|---|
protected Node[] | children children of this node. |
protected int | id id of the node. |
protected Node | parent parent node. |
protected Parser | parser parser that created the node. |
Constructor Summary | |
---|---|
SimpleNode(int i)
Create the node given an id.
| |
SimpleNode(Parser p, int i)
Create a node with the given parser and id.
|
Method Summary | |
---|---|
Object | childrenAccept(ParserVisitor visitor, Object data)
Visit all children.
|
void | dump(String prefix)
Dump the node and all children. |
Object | execute(Object o, JexlContext ctx)
Used to let a node calcuate it's value.. |
boolean | interpret(JexlContext pc)
basic interpret - just invoke interpret on all children. |
Object | jjtAccept(ParserVisitor visitor, Object data)
Accept the visitor.
|
void | jjtAddChild(Node n, int i) |
void | jjtClose()
End of the node. |
Node | jjtGetChild(int i) |
int | jjtGetNumChildren() |
Node | jjtGetParent() |
void | jjtOpen()
Start of the node. |
void | jjtSetParent(Node n) |
Object | setValue(JexlContext context, Object value)
Sets the value for the node - again, only makes sense for some nodes but
lazyness tempts me to put it here. |
String | toString()
Gets a string representation of the node. |
String | toString(String prefix)
Used during dumping to output the node with a prefix. |
Object | value(JexlContext context)
Gets the value of this node.
|
Parameters: i node id.
Parameters: p a parser. i node id.
Parameters: visitor a ParserVisitor. data data to be passed along to the visitor.
Returns: the value from visiting.
See Also: ParserVisitor
Parameters: prefix text to prefix the node output.
Parameters: o the object to calculate with. ctx the context to retrieve values from.
Returns: the result of the calculation.
Throws: Exception when calculating the value fails.
Parameters: pc the context
to interpret against.
Returns: true if interpretation worked.
Throws: Exception on any error.
Parameters: visitor a ParserVisitor. data data to be passed along to the visitor.
Returns: the value from visiting.
See Also: ParserVisitor
Parameters: context the context to retrieve values from. value the value.
Returns: the result.
Throws: Exception when evaluating the operands fails.
Returns: the node name.
Parameters: prefix text to prefix toString
Returns: text.
Parameters: context the context to retrieve values from.
Returns: the value of the node.
Throws: Exception when evaluating the operands fails.