Interface Expression
- 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
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionchildren()
default Object
evaluate
(EvaluationContext context) default Object
This method is allowed to throw exceptions and evaluates the expression in an empty context.evaluateUnsafe
(EvaluationContext context) This method is allowed to throw exceptions.org.antlr.v4.runtime.Token
getType()
boolean
default Expression.Type
nodeType()
-
Method Details
-
isConstant
boolean isConstant() -
getStartToken
org.antlr.v4.runtime.Token getStartToken() -
evaluate
-
getType
Class getType() -
evaluateUnsafe
This method is allowed to throw exceptions. The outside world is supposed to call evaluate instead. -
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
-