Class JexlNode

  extended by org.apache.commons.jexl3.parser.SimpleNode
      extended by org.apache.commons.jexl3.parser.JexlNode
All Implemented Interfaces:
JexlInfo.Handle, Node
Direct Known Subclasses:
ASTAdditiveNode, ASTAdditiveOperator, ASTAmbiguous, ASTAndNode, ASTArrayAccess, ASTArrayLiteral, ASTAssignment, ASTBitwiseAndNode, ASTBitwiseComplNode, ASTBitwiseOrNode, ASTBitwiseXorNode, ASTBlock, ASTConstructorNode, ASTDivNode, ASTEmptyFunction, ASTEQNode, ASTERNode, ASTFalseNode, ASTForeachStatement, ASTFunctionNode, ASTGENode, ASTGTNode, ASTIdentifier, ASTIfStatement, ASTJexlScript, ASTLENode, ASTLTNode, ASTMapEntry, ASTMapLiteral, ASTMethodNode, ASTModNode, ASTMulNode, ASTNENode, ASTNotNode, ASTNRNode, ASTNullLiteral, ASTNumberLiteral, ASTOrNode, ASTReference, ASTReturnStatement, ASTSizeFunction, ASTSizeMethod, ASTStringLiteral, ASTTernaryNode, ASTTrueNode, ASTUnaryMinusNode, ASTWhileStatement

public abstract class JexlNode
extends SimpleNode
implements JexlInfo.Handle

Base class for parser nodes - holds an 'image' of the token for later use.


Nested Class Summary
static interface JexlNode.Literal<T>
          A marker interface for literals.
Field Summary
 String image
          token value.
Fields inherited from class org.apache.commons.jexl3.parser.SimpleNode
children, id, parent, value
Constructor Summary
JexlNode(int id)
JexlNode(Parser p, int id)
Method Summary
 boolean isConstant()
          Whether this node is a constant node Its value can not change after the first evaluation and can be cached indefinitely.
protected  boolean isConstant(boolean literal)
 JexlInfo jexlInfo()
          Gets the associated JexlInfo instance.
Methods inherited from class org.apache.commons.jexl3.parser.SimpleNode
childrenAccept, dump, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetParent, jjtSetValue, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


public String image
token value.

Constructor Detail


public JexlNode(int id)


public JexlNode(Parser p,
                int id)
Method Detail


public JexlInfo jexlInfo()
Gets the associated JexlInfo instance.

Specified by:
jexlInfo in interface JexlInfo.Handle
the info


public final boolean isConstant()
Whether this node is a constant node Its value can not change after the first evaluation and can be cached indefinitely.

true if constant, false otherwise


protected boolean isConstant(boolean literal)

Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.