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:
JexlCache.Reference,Node
- Direct Known Subclasses:
ASTNamespaceIdentifier,ASTVar
public class ASTIdentifier extends JexlNode
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, JexlNode.JxltHandle
-
-
Field Summary
Fields Modifier and Type Field Description private static intCAPTUREDThe captured variable flag.private static intCONSTThe const variable flag.protected intflagsprivate static intLEXICALThe lexical variable flag.protected java.lang.Stringnameprivate static intREDEFINEDThe redefined variable flag.private static longserialVersionUIDprivate static intSHADEDThe shaded variable flag.protected intsymbol-
Fields inherited from class org.apache.commons.jexl3.parser.SimpleNode
id
-
-
Constructor Summary
Constructors Constructor Description ASTIdentifier(int id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()java.lang.StringgetNamespace()intgetSymbol()booleanisCaptured()booleanisConstant()Tests whether this node is a constant node.booleanisLexical()booleanisRedefined()private static booleanisSet(int ordinal, int mask)Checks the value of a flag in the mask.booleanisShaded()java.lang.ObjectjjtAccept(ParserVisitor visitor, java.lang.Object data)Accepts 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) voidsetSymbol(int r, java.lang.String identifier)(package private) voidsetSymbol(java.lang.String identifier)java.lang.StringtoString()-
Methods inherited from class org.apache.commons.jexl3.parser.JexlNode
clearCache, getCache, getColumn, getLine, isConstant, isGlobalVar, isLeftValue, isSafeLhs, isStrictOperator, jexlInfo, jexlInfo, jjtSetFirstToken, jjtSetLastToken, setCache
-
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
-
REDEFINED
private static final int REDEFINED
The redefined variable flag.- See Also:
- Constant Field Values
-
SHADED
private static final int SHADED
The shaded variable flag.- See Also:
- Constant Field Values
-
CAPTURED
private static final int CAPTURED
The captured variable flag.- See Also:
- Constant Field Values
-
LEXICAL
private static final int LEXICAL
The lexical variable flag.- See Also:
- Constant Field Values
-
CONST
private static final int CONST
The const variable flag.- See Also:
- Constant Field Values
-
name
protected java.lang.String name
-
symbol
protected int symbol
-
flags
protected int flags
-
-
Method Detail
-
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
-
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
-
getName
public java.lang.String getName()
-
getNamespace
public java.lang.String getNamespace()
-
getSymbol
public int getSymbol()
-
isCaptured
public boolean isCaptured()
-
isConstant
public boolean isConstant()
Description copied from class:JexlNodeTests whether this node is a constant node.Its value cannot change after the first evaluation and can be cached indefinitely.
- Overrides:
isConstantin classJexlNode- Returns:
- true if constant, false otherwise
-
isLexical
public boolean isLexical()
-
isRedefined
public boolean isRedefined()
-
isShaded
public boolean isShaded()
-
jjtAccept
public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
Description copied from class:SimpleNodeAccepts the visitor.- Specified by:
jjtAcceptin interfaceNode- Overrides:
jjtAcceptin classSimpleNode- Parameters:
visitor- the visitordata- contextual data- Returns:
- result of visit
-
setCaptured
public void setCaptured(boolean f)
-
setConstant
public void setConstant(boolean f)
-
setLexical
public void setLexical(boolean f)
-
setRedefined
public void setRedefined(boolean f)
-
setShaded
public void setShaded(boolean f)
-
setSymbol
void setSymbol(int r, java.lang.String identifier)
-
setSymbol
void setSymbol(java.lang.String identifier)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classSimpleNode
-
-