Class ASTIdentifierAccess

All Implemented Interfaces:
Node
Direct Known Subclasses:
ASTIdentifierAccessJxlt, ASTIdentifierAccessSafe

public class ASTIdentifierAccess extends JexlNode
Identifiers, variables and registers.
  • Field Details

  • Constructor Details

    • ASTIdentifierAccess

      ASTIdentifierAccess(int id)
  • Method Details

    • parseIdentifier

      public static Integer parseIdentifier(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 Object getIdentifier()
    • getName

      public 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 class JexlNode
      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 Object jjtAccept(ParserVisitor visitor, Object data)
      Description copied from class: SimpleNode
      Accepts the visitor.
      Specified by:
      jjtAccept in interface Node
      Overrides:
      jjtAccept in class SimpleNode
      Parameters:
      visitor - the visitor
      data - contextual data
      Returns:
      result of visit
    • setIdentifier

      void setIdentifier(String id)
    • toString

      public String toString()
      Overrides:
      toString in class SimpleNode