org.eclipse.mofscript.runtime.expression
Class ExpressionEvaluator

java.lang.Object
  extended by org.eclipse.mofscript.runtime.expression.ExpressionEvaluator
Direct Known Subclasses:
ArithmeticExpressionEvaluator, ComparisonExpressionEvaluator, CreateExpressionEvaluator, LogicalExpressionEvaluator, NullEvaluator, SelectExpressionEvaluator, SimpleExpressionEvaluator

public abstract class ExpressionEvaluator
extends java.lang.Object

Handles expressions

Author:
jol

Constructor Summary
ExpressionEvaluator(Expression expression, ExecutionEnvironment env, RuleExecutor ownerRuleExecutor)
          Constructor
 
Method Summary
 java.lang.Object evaluateExpression(java.lang.Object inputObject)
          Evaluates an expression and returns the value as an Object
 Expression getExpression()
           
 TransformationRule getOwnerRule()
           
static void resetPosisionCounter()
          Resetes the position counter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionEvaluator

public ExpressionEvaluator(Expression expression,
                           ExecutionEnvironment env,
                           RuleExecutor ownerRuleExecutor)
Constructor

Parameters:
expression - The expression to be evaluated
env - The ExecutionEnvironment
ownerRuleExecutor - The rule executor that owns the expression
Method Detail

getOwnerRule

public TransformationRule getOwnerRule()
Returns:

getExpression

public Expression getExpression()
Returns:

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()
Resetes the position counter