class RuntimeJastInterpreter.LogicalExpressionAdapter extends LogicalExpression
LogicalExpression
. Overriding JASTs should implement at least the execute
method. The evaluation of result of the overridden method is delegated to the interpreter.
This class is immutable so the instances of it are constants, once created, the internal data cannot be changed.
Modifier and Type | Field and Description |
---|---|
private JavaAst |
executeMethod
The JAST tree that describes the
execute method to be implemented by this object. |
private RuntimeJastInterpreter |
interpreter
The
RuntimeJastInterpreter that will handle interpretation of this anonymous
object. |
Constructor and Description |
---|
LogicalExpressionAdapter(RuntimeJastInterpreter interpreter,
JavaAst executeMethod)
The only constructor.
|
Modifier and Type | Method and Description |
---|---|
logical |
execute()
Evaluates the
execute method. |
getType, resolve
private RuntimeJastInterpreter interpreter
RuntimeJastInterpreter
that will handle interpretation of this anonymous
object. Must not be null
.private JavaAst executeMethod
execute
method to be implemented by this object.public LogicalExpressionAdapter(RuntimeJastInterpreter interpreter, JavaAst executeMethod)
execute
method
is delegated and the JAST of the implemented method.interpreter
- The RuntimeJastInterpreter
responsible with interpretation of the
methods overridden by this anonymous object.executeMethod
- The JAST that describes the execute
method.public logical execute()
execute
method. If overridden, the interpreter
is
responsible for interpretation of the JAST, otherwise the super method is called.execute
in class LogicalExpression