org.sintef.mofscript.runtime.expression
Class ExpressionEvaluator
java.lang.Object
org.sintef.mofscript.runtime.expression.ExpressionEvaluator
- Direct Known Subclasses:
- ArithmeticExpressionEvaluator, ComparisonExpressionEvaluator, LogicalExpressionEvaluator, NullEvaluator, SimpleExpressionEvaluator
public abstract class ExpressionEvaluator
- extends java.lang.Object
Method Summary |
protected abstract java.lang.Object |
evaluate(java.lang.Object inputObject)
To be defined by subclasses - the actual evaluation of the expression |
java.lang.Object |
evaluateExpression(java.lang.Object inputObject)
Evaluates an expression and returns the value as an Object |
static void |
resetPosisionCounter()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_expression
protected Expression _expression
_env
protected ExecutionEnvironment _env
_ownerRuleExecutor
protected RuleExecutor _ownerRuleExecutor
_positionCounter
protected static int _positionCounter
ExpressionEvaluator
public ExpressionEvaluator(Expression expression,
ExecutionEnvironment env,
RuleExecutor ownerRuleExecutor)
evaluateExpression
public final java.lang.Object evaluateExpression(java.lang.Object inputObject)
throws MofScriptExecutionException
- Evaluates an expression and returns the value as an Object
- Parameters:
exp
-
- Returns:
-
- Throws:
MofScriptExecutionException
resetPosisionCounter
public static void resetPosisionCounter()
evaluate
protected abstract java.lang.Object evaluate(java.lang.Object inputObject)
throws MofScriptExecutionException
- To be defined by subclasses - the actual evaluation of the expression
- Returns:
-
- Throws:
MofScriptExecutionException