All Known Subinterfaces:
LogicalExpression, NumericExpression
All Known Implementing Classes:
AdditionExpression, AndExpression, ArrayLiteralExpression, BaseExpression, BinaryExpression, BooleanExpression, BooleanValuedFunctionWrapper, ComparisonExpression, ConstantExpression, DoubleExpression, EqualityExpression, FieldAccessExpression, FieldRefExpression, FunctionExpression, IndexedAccessExpression, LongExpression, MapLiteralExpression, MessageRefExpression, MultiplicationExpression, NotExpression, OrExpression, SignedExpression, StringExpression, UnaryExpression, VarRefExpression

public interface Expression
  • Method Details

    • isConstant

      boolean isConstant()
    • getStartToken

      org.antlr.v4.runtime.Token getStartToken()
    • evaluate

      @Nullable default Object evaluate(EvaluationContext context)
    • getType

      Class getType()
    • evaluateUnsafe

      @Nullable Object evaluateUnsafe(EvaluationContext context)
      This method is allowed to throw exceptions. The outside world is supposed to call evaluate instead.
    • evaluateUnsafe

      default Object evaluateUnsafe()
      This method is allowed to throw exceptions and evaluates the expression in an empty context. It is only useful for the interpreter/code generator to evaluate constant expressions to their effective value.
      Returns:
      the value of the expression in an empty context
    • children

      Iterable<Expression> children()
    • nodeType

      default Expression.Type nodeType()