| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.commons.jexl.parser.SimpleNode
A Useful implementation of Node. Mostly autogenerated by javacc
| Field Summary | |
| protected  Node[] | childrenchildren of this node. | 
| protected  int | idid of the node. | 
| protected  Node | parentparent node. | 
| protected  Parser | parserparser 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){@inheritDoc} | 
|  void | jjtClose()End of the node. | 
|  Node | jjtGetChild(int i){@inheritDoc} | 
|  int | jjtGetNumChildren(){@inheritDoc} | 
|  Node | jjtGetParent(){@inheritDoc} | 
|  void | jjtOpen()Start of the node. | 
|  void | jjtSetParent(Node n){@inheritDoc} | 
|  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. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected Node parent
protected Node[] children
protected int id
protected Parser parser
| Constructor Detail | 
public SimpleNode(int i)
i - node id.
public SimpleNode(Parser p,
                  int i)
p - a parser.i - node id.| Method Detail | 
public void jjtOpen()
jjtOpen in interface Nodepublic void jjtClose()
jjtClose in interface Nodepublic void jjtSetParent(Node n)
jjtSetParent in interface Nodeorg.apache.commons.jexl.parser.Noden - the parent node.public Node jjtGetParent()
jjtGetParent in interface Nodeorg.apache.commons.jexl.parser.Node
public void jjtAddChild(Node n,
                        int i)
jjtAddChild in interface Nodeorg.apache.commons.jexl.parser.Noden - the child node to addi - the index to add it at.public Node jjtGetChild(int i)
jjtGetChild in interface Nodeorg.apache.commons.jexl.parser.Nodei - the index of the child to get.public int jjtGetNumChildren()
jjtGetNumChildren in interface Nodeorg.apache.commons.jexl.parser.Node
public Object jjtAccept(ParserVisitor visitor,
                        Object data)
jjtAccept in interface Nodevisitor - a ParserVisitor.data - data to be passed along to the visitor.ParserVisitor.visit(org.apache.commons.jexl.parser.SimpleNode, java.lang.Object)
public Object childrenAccept(ParserVisitor visitor,
                             Object data)
visitor - a ParserVisitor.data - data to be passed along to the visitor.ParserVisitor.visit(org.apache.commons.jexl.parser.SimpleNode, java.lang.Object)public String toString()
toString in class Objectpublic String toString(String prefix)
prefix - text to prefix toString()public void dump(String prefix)
prefix - text to prefix the node output.
public boolean interpret(JexlContext pc)
                  throws Exception
pc - the context to interpret against.Exception - on any error.
public Object value(JexlContext context)
             throws Exception
context - the context to retrieve values from.Exception - when evaluating the operands fails.
public Object setValue(JexlContext context,
                       Object value)
                throws Exception
context - the context to retrieve values from.value - the value.Exception - when evaluating the operands fails.
public Object execute(Object o,
                      JexlContext ctx)
               throws Exception
o - the object to calculate with.ctx - the context to retrieve values from.Exception - when calculating the value fails.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||