Interface Expression.Visitor<T>

Type Parameters:
T - the return type of the visitor methods
Enclosing interface:
Expression

public static interface Expression.Visitor<T>
Visitor interface for implementing the visitor pattern on expressions. This interface defines methods for visiting different types of expressions, allowing for type-safe operations across the expression hierarchy.
  • Method Details

    • visitLiteral

      T visitLiteral(Literal<?> literal)
      Visits a literal expression.
      Parameters:
      literal - the literal expression to visit
      Returns:
      the result of visiting the literal expression
    • visitRoot

      T visitRoot(Root root)
      Visits a root expression.
      Parameters:
      root - the root expression to visit
      Returns:
      the result of visiting the root expression
    • visitBinary

      T visitBinary(Binary binary)
      Visits a binary expression.
      Parameters:
      binary - the binary expression to visit
      Returns:
      the result of visiting the binary expression
    • visitNot

      T visitNot(Not not)
      Visits a not expression (logical negation).
      Parameters:
      not - the not expression to visit
      Returns:
      the result of visiting the not expression
    • visitGetItem

      T visitGetItem(GetItem getItem)
      Visits a get item expression (array/object indexing).
      Parameters:
      getItem - the get item expression to visit
      Returns:
      the result of visiting the get item expression
    • visitOther

      T visitOther(Expression expression)
      For expressions that do not have a specific visitor method.