Class ASTArrayAccess

All Implemented Interfaces:
JexlCache.Reference, JexlParser.LexicalUnit, Node

public class ASTArrayAccess extends JexlLexicalNode
Array access supporting (optional) safe notation.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • safe

      private long safe
      Which children are accessed using a safe notation. Note that this does not really work after the 64th child. However, an expression like 'a?[b]?[c]?...?[b0]' with 64 terms is very unlikely to occur in real life and a bad idea anyhow.
  • Constructor Details

    • ASTArrayAccess

      public ASTArrayAccess(int id)
    • ASTArrayAccess

      public ASTArrayAccess(Parser p, int id)
  • Method Details

    • isSafeChild

      public boolean isSafeChild(int c)
    • isSafeLhs

      public boolean isSafeLhs(boolean safe)
      Description copied from class: JexlNode
      Tests whether this node is the left-hand side of a safe access identifier as in. For instance, in 'x?.y' , 'x' is safe.
      Overrides:
      isSafeLhs in class JexlNode
      Parameters:
      safe - whether the engine is in safe-navigation mode
      Returns:
      true if safe lhs, false otherwise
    • 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
    • setSafe

      void setSafe(long s)