| java.lang.Object org.apache.commons.jexl.parser.SimpleNode
All known Subclasses: org.apache.commons.jexl.parser.ASTAssignment, org.apache.commons.jexl.parser.ASTArrayAccess, org.apache.commons.jexl.parser.ASTFloatLiteral, org.apache.commons.jexl.parser.ASTModNode, org.apache.commons.jexl.parser.ASTExpression, org.apache.commons.jexl.parser.ASTOrNode, org.apache.commons.jexl.parser.ASTStringLiteral, org.apache.commons.jexl.parser.ASTGENode, org.apache.commons.jexl.parser.ASTNotNode, org.apache.commons.jexl.parser.ASTNullLiteral, org.apache.commons.jexl.parser.ASTDivNode, org.apache.commons.jexl.parser.ASTBlock, org.apache.commons.jexl.parser.ASTJexlScript, org.apache.commons.jexl.parser.ASTStatementExpression, org.apache.commons.jexl.parser.ASTForeachStatement, org.apache.commons.jexl.parser.ASTSizeMethod, org.apache.commons.jexl.parser.ASTIfStatement, org.apache.commons.jexl.parser.ASTReferenceExpression, org.apache.commons.jexl.parser.ASTTrueNode, org.apache.commons.jexl.parser.ASTBitwiseComplNode, org.apache.commons.jexl.parser.ASTWhileStatement, org.apache.commons.jexl.parser.ASTMulNode, org.apache.commons.jexl.parser.ASTSubtractNode, org.apache.commons.jexl.parser.ASTLENode, org.apache.commons.jexl.parser.ASTBitwiseXorNode, org.apache.commons.jexl.parser.ASTFalseNode, org.apache.commons.jexl.parser.ASTLTNode, org.apache.commons.jexl.parser.ASTReference, org.apache.commons.jexl.parser.ASTIdentifier, org.apache.commons.jexl.parser.ASTEmptyFunction, org.apache.commons.jexl.parser.ASTIntegerLiteral, org.apache.commons.jexl.parser.ASTBitwiseAndNode, org.apache.commons.jexl.parser.ASTAddNode, org.apache.commons.jexl.parser.ASTSizeFunction, org.apache.commons.jexl.parser.ASTMethod, org.apache.commons.jexl.parser.ASTEQNode, org.apache.commons.jexl.parser.ASTNENode, org.apache.commons.jexl.parser.ASTGTNode, org.apache.commons.jexl.parser.ASTBitwiseOrNode, org.apache.commons.jexl.parser.ASTUnaryMinusNode, org.apache.commons.jexl.parser.ASTAndNode, org.apache.commons.jexl.parser.ASTExpressionExpression,
SimpleNode | public class SimpleNode implements Node(Code) | | A Useful implementation of
Node . Mostly autogenerated by javacc
author: Geir Magnusson Jr. version: $Id: SimpleNode.java 398328 2006-04-30 12:46:59Z dion $ |
Constructor Summary | |
public | SimpleNode(int i) Create the node given an id. | public | SimpleNode(Parser p, int i) Create a node with the given parser and id. |
children | protected Node[] children(Code) | | children of this node.
|
id | protected int id(Code) | | id of the node.
|
parser | protected Parser parser(Code) | | parser that created the node.
|
SimpleNode | public SimpleNode(int i)(Code) | | Create the node given an id.
Parameters: i - node id. |
SimpleNode | public SimpleNode(Parser p, int i)(Code) | | Create a node with the given parser and id.
Parameters: p - a parser. Parameters: i - node id. |
dump | public void dump(String prefix)(Code) | | Dump the node and all children.
Parameters: prefix - text to prefix the node output. |
execute | public Object execute(Object o, JexlContext ctx) throws Exception(Code) | | Used to let a node calcuate it's value..
Parameters: o - the object to calculate with. Parameters: ctx - the context to retrieve values from. throws: Exception - when calculating the value fails. the result of the calculation. |
interpret | public boolean interpret(JexlContext pc) throws Exception(Code) | | basic interpret - just invoke interpret on all children.
Parameters: pc - the JexlContext context to interpret against. true if interpretation worked. throws: Exception - on any error. |
jjtAddChild | public void jjtAddChild(Node n, int i)(Code) | |
|
jjtClose | public void jjtClose()(Code) | | End of the node.
|
jjtGetNumChildren | public int jjtGetNumChildren()(Code) | |
|
jjtOpen | public void jjtOpen()(Code) | | Start of the node.
|
jjtSetParent | public void jjtSetParent(Node n)(Code) | |
|
setValue | public Object setValue(JexlContext context, Object value) throws Exception(Code) | | Sets the value for the node - again, only makes sense for some nodes but
lazyness tempts me to put it here. Keeps things simple.
Parameters: context - the context to retrieve values from. Parameters: value - the value. the result. throws: Exception - when evaluating the operands fails. |
toString | public String toString()(Code) | | Gets a string representation of the node.
the node name. |
value | public Object value(JexlContext context) throws Exception(Code) | | Gets the value of this node.
Parameters: context - the context to retrieve values from. the value of the node. throws: Exception - when evaluating the operands fails. |
|
|