Class ASTIdentifier

All Implemented Interfaces:
Node
Direct Known Subclasses:
ASTNamespaceIdentifier, ASTVar

public class ASTIdentifier extends JexlNode
Identifiers, variables, ie symbols.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • name

      protected String name
    • symbol

      protected int symbol
    • flags

      protected int flags
    • REDEFINED

      private static final int REDEFINED
      The redefined variable flag.
      See Also:
    • SHADED

      private static final int SHADED
      The shaded variable flag.
      See Also:
    • CAPTURED

      private static final int CAPTURED
      The captured variable flag.
      See Also:
    • LEXICAL

      private static final int LEXICAL
      The lexical variable flag.
      See Also:
    • CONST

      private static final int CONST
      The const variable flag.
      See Also:
  • Constructor Details

    • ASTIdentifier

      ASTIdentifier(int id)
    • ASTIdentifier

      ASTIdentifier(Parser p, int id)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class SimpleNode
    • setSymbol

      void setSymbol(String identifier)
    • setSymbol

      void setSymbol(int r, String identifier)
    • 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 ordinal
      mask - the flags mask
      value - 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 ordinal
      mask - 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: JexlNode
      Whether this node is a constant node.

      Its value can not change after the first evaluation and can be cached indefinitely.

      Overrides:
      isConstant in class JexlNode
      Returns:
      true if constant, false otherwise
    • setConstant

      public void setConstant(boolean f)
    • getName

      public String getName()
    • getNamespace

      public String getNamespace()
    • jjtAccept

      public Object jjtAccept(ParserVisitor visitor, Object data)
      Description copied from class: SimpleNode
      Accept the visitor.
      Specified by:
      jjtAccept in interface Node
      Overrides:
      jjtAccept in class SimpleNode
      Parameters:
      visitor - the visitor
      data - contextual data
      Returns:
      result of visit