ValueEvaluator
The value evaluator tries to evaluate the (constant) value of an Expression basically by following DFG edges until we reach a Literal. It also evaluates simple binary operations, such as arithmetic operations, as well as simple string concatenations.
The result can be retrieved in two ways:
The result of the resolve function is a JVM object which represents the constant value
Furthermore, after the execution of evaluateInternal, the latest evaluation path can be retrieved in the path property of the evaluator.
It contains some advanced mechanics such as resolution of values of arrays, if they contain literal values. Furthermore, its behaviour can be adjusted by implementing the cannotEvaluate function, which is called when the default behaviour would not be able to resolve the value. This way, language specific features such as string formatting can be modelled.
Inheritors
Constructors
Properties
Contains a reference to a function that gets called if the value cannot be resolved by the standard behaviour.
This property contains the path of the latest execution of evaluateInternal.