Package org.apache.commons.jexl3.parser
Class ASTIdentifier
java.lang.Object
org.apache.commons.jexl3.parser.SimpleNode
org.apache.commons.jexl3.parser.JexlNode
org.apache.commons.jexl3.parser.ASTIdentifier
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
ASTNamespaceIdentifier,ASTVar
Identifiers, variables, ie symbols.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.jexl3.parser.JexlNode
JexlNode.Constant<T>, JexlNode.Funcall, JexlNode.Info -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intThe captured variable flag.private static final intThe const variable flag.protected intprivate static final intThe lexical variable flag.protected Stringprivate static final intThe redefined variable flag.private static final longprivate static final intThe shaded variable flag.protected intFields inherited from class org.apache.commons.jexl3.parser.SimpleNode
id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()intbooleanbooleanWhether this node is a constant node.booleanbooleanprivate static booleanisSet(int ordinal, int mask) Checks the value of a flag in the mask.booleanisShaded()jjtAccept(ParserVisitor visitor, Object data) Accept the visitor.private static intset(int ordinal, int mask, boolean value) Sets the value of a flag in a mask.voidsetCaptured(boolean f) voidsetConstant(boolean f) voidsetLexical(boolean f) voidsetRedefined(boolean f) voidsetShaded(boolean f) (package private) void(package private) voidtoString()Methods inherited from class org.apache.commons.jexl3.parser.JexlNode
clearCache, getColumn, getLine, isConstant, isGlobalVar, isLeftValue, isSafeLhs, isStrictOperator, jexlInfo, jjtSetFirstToken, jjtSetLastTokenMethods 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 Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
-
symbol
protected int symbol -
flags
protected int flags -
REDEFINED
private static final int REDEFINEDThe redefined variable flag.- See Also:
-
SHADED
private static final int SHADEDThe shaded variable flag.- See Also:
-
CAPTURED
private static final int CAPTUREDThe captured variable flag.- See Also:
-
LEXICAL
private static final int LEXICALThe lexical variable flag.- See Also:
-
CONST
private static final int CONSTThe const variable flag.- See Also:
-
-
Constructor Details
-
ASTIdentifier
ASTIdentifier(int id) -
ASTIdentifier
ASTIdentifier(Parser p, int id)
-
-
Method Details
-
toString
- Overrides:
toStringin classSimpleNode
-
setSymbol
-
setSymbol
-
getSymbol
public int getSymbol() -
set
private static int set(int ordinal, int mask, boolean value) Sets the value of a flag in a mask.- Parameters:
ordinal- the flag ordinalmask- the flags maskvalue- true or false- Returns:
- the new flags mask value
-
isSet
private static boolean isSet(int ordinal, int mask) Checks the value of a flag in the mask.- Parameters:
ordinal- the flag ordinalmask- the flags mask- Returns:
- the mask value with this flag or-ed in
-
setRedefined
public void setRedefined(boolean f) -
isRedefined
public boolean isRedefined() -
setShaded
public void setShaded(boolean f) -
isShaded
public boolean isShaded() -
setCaptured
public void setCaptured(boolean f) -
isCaptured
public boolean isCaptured() -
isLexical
public boolean isLexical() -
setLexical
public void setLexical(boolean f) -
isConstant
public boolean isConstant()Description copied from class:JexlNodeWhether this node is a constant node.Its value can not change after the first evaluation and can be cached indefinitely.
- Overrides:
isConstantin classJexlNode- Returns:
- true if constant, false otherwise
-
setConstant
public void setConstant(boolean f) -
getName
-
getNamespace
-
jjtAccept
Description copied from class:SimpleNodeAccept the visitor.- Specified by:
jjtAcceptin interfaceNode- Overrides:
jjtAcceptin classSimpleNode- Parameters:
visitor- the visitordata- contextual data- Returns:
- result of visit
-