Package org.apache.commons.jexl3.parser
Class ASTIdentifierAccess
- java.lang.Object
-
- org.apache.commons.jexl3.parser.SimpleNode
-
- org.apache.commons.jexl3.parser.JexlNode
-
- org.apache.commons.jexl3.parser.ASTIdentifierAccess
-
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
ASTIdentifierAccessJxlt
,ASTIdentifierAccessSafe
public class ASTIdentifierAccess extends JexlNode
Identifiers, variables and registers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.jexl3.parser.JexlNode
JexlNode.Constant<T>, JexlNode.Funcall, JexlNode.Info
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Integer
identifier
private java.lang.String
name
private static long
serialVersionUID
-
Fields inherited from class org.apache.commons.jexl3.parser.SimpleNode
id
-
-
Constructor Summary
Constructors Constructor Description ASTIdentifierAccess(int id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getIdentifier()
java.lang.String
getName()
boolean
isExpression()
Whether this is a Jxlt based identifier.boolean
isGlobalVar()
boolean
isSafe()
Whether this is a dot or a question-mark-dot aka safe-navigation access.java.lang.Object
jjtAccept(ParserVisitor visitor, java.lang.Object data)
Accepts the visitor.static java.lang.Integer
parseIdentifier(java.lang.String id)
Parse an identifier which must be of the form: 0|([1-9][0-9]*)(package private) void
setIdentifier(java.lang.String id)
java.lang.String
toString()
-
Methods inherited from class org.apache.commons.jexl3.parser.JexlNode
clearCache, getColumn, getLine, isConstant, isConstant, isLeftValue, isSafeLhs, isStrictOperator, jexlInfo, jjtSetFirstToken, jjtSetLastToken
-
Methods inherited from class org.apache.commons.jexl3.parser.SimpleNode
childrenAccept, dump, dumpOut, getId, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetChildren, jjtSetParent, jjtSetValue, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
name
private java.lang.String name
-
identifier
private java.lang.Integer identifier
-
-
Method Detail
-
parseIdentifier
public static java.lang.Integer parseIdentifier(java.lang.String id)
Parse an identifier which must be of the form: 0|([1-9][0-9]*)- Parameters:
id
- the identifier- Returns:
- an integer or null
-
getIdentifier
public java.lang.Object getIdentifier()
-
getName
public java.lang.String getName()
-
isExpression
public boolean isExpression()
Whether this is a Jxlt based identifier.- Returns:
- true if `..${...}...`, false otherwise
-
isGlobalVar
public boolean isGlobalVar()
- Overrides:
isGlobalVar
in classJexlNode
- Returns:
- true if this node looks like a global var
-
isSafe
public boolean isSafe()
Whether this is a dot or a question-mark-dot aka safe-navigation access.- Returns:
- true is ?., false if .
-
jjtAccept
public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
Description copied from class:SimpleNode
Accepts the visitor.- Specified by:
jjtAccept
in interfaceNode
- Overrides:
jjtAccept
in classSimpleNode
- Parameters:
visitor
- the visitordata
- contextual data- Returns:
- result of visit
-
setIdentifier
void setIdentifier(java.lang.String id)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classSimpleNode
-
-