org.apache.commons.jexl2.parser
Class JexlNode
java.lang.Object
org.apache.commons.jexl2.parser.SimpleNode
org.apache.commons.jexl2.parser.JexlNode
- All Implemented Interfaces:
- JexlInfo, org.apache.commons.jexl2.parser.Node
- Direct Known Subclasses:
- org.apache.commons.jexl2.parser.ASTArrayAccess, ASTArrayLiteral, ASTFloatLiteral, ASTIdentifier, ASTIntegerLiteral, ASTJexlScript, ASTMapLiteral, ASTNumberLiteral, ASTStringLiteral
public abstract class JexlNode
- extends SimpleNode
- implements JexlInfo
Base class for parser nodes - holds an 'image' of the token for later use.
- Since:
- 2.0
Nested Class Summary |
static interface |
JexlNode.Literal<T>
A marker interface for literals. |
Field Summary |
java.lang.String |
image
token value. |
Constructor Summary |
JexlNode(int id)
|
JexlNode(org.apache.commons.jexl2.parser.Parser p,
int id)
|
Method Summary |
DebugInfo |
debugInfo()
Gets the underlying debugging information. |
java.lang.String |
debugString()
Formats this information for debugging purpose. |
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)
|
Methods inherited from class org.apache.commons.jexl2.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 |
image
public java.lang.String image
- token value.
JexlNode
public JexlNode(int id)
JexlNode
public JexlNode(org.apache.commons.jexl2.parser.Parser p,
int id)
debugInfo
public DebugInfo debugInfo()
- Gets the underlying debugging information.
- Specified by:
debugInfo
in interface JexlInfo
- Returns:
- a debug info instance
debugString
public java.lang.String debugString()
- Formats this information for debugging purpose.
- Specified by:
debugString
in interface JexlInfo
- Returns:
- a human readable string.
isConstant
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.
- Returns:
- true if constant, false otherwise
isConstant
protected boolean isConstant(boolean literal)
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.