org.sintef.mofscript.runtime.expression
Class FunctionCallEvaluator

java.lang.Object
  extended by org.sintef.mofscript.runtime.expression.ExpressionEvaluator
      extended by org.sintef.mofscript.runtime.expression.SimpleExpressionEvaluator
          extended by org.sintef.mofscript.runtime.expression.FunctionCallEvaluator
Direct Known Subclasses:
UMLFunctionCallEvaluator

public class FunctionCallEvaluator
extends SimpleExpressionEvaluator


Field Summary
protected  ExpressionEvaluator evaluator
           
protected  ValueExpression p1
           
protected  java.lang.Object p1Result
           
protected  ValueExpression p2
           
protected  java.lang.Object p2Result
           
protected  ValueExpression p3
           
protected  java.lang.Object p3Result
           
 
Fields inherited from class org.sintef.mofscript.runtime.expression.ExpressionEvaluator
_env, _expression, _ownerRuleExecutor, _positionCounter
 
Constructor Summary
FunctionCallEvaluator(Expression expression, ExecutionEnvironment env, RuleExecutor ownerRuleExecutor)
           
 
Method Summary
protected  void evaluateParameterValues(java.util.List parameters)
           
protected  java.lang.Object evaluateSimple(java.lang.Object inputObject)
           
protected  java.lang.Object handleFunctionCall(FunctionCall f, java.lang.Object inputContext)
           
protected  java.lang.Object handleModelEscapeFunction(java.lang.Object variable, java.lang.String fName, FunctionCall f)
           
protected  java.lang.Object handleOclGeneralFunction(java.lang.Object variable, java.lang.String fName, FunctionCall f)
           
protected  java.lang.Object handleSystemFunction(java.lang.String fName, FunctionCall f)
           
protected  java.lang.Object handleVariableFunctionCall(java.lang.Object variable, java.lang.String fName, FunctionCall f)
           
static java.lang.Boolean isKindOf(org.eclipse.emf.ecore.EObject toCheck, java.lang.Object clazz)
           
protected  boolean isSystemFunction(java.lang.String functionName)
           
static java.lang.Boolean isTypeOf(org.eclipse.emf.ecore.EObject toCheck, java.lang.Object clazz)
           
 
Methods inherited from class org.sintef.mofscript.runtime.expression.SimpleExpressionEvaluator
checkAdditionalExpressionParts, evaluate, handleAdditionalFunction, handleStringFunction
 
Methods inherited from class org.sintef.mofscript.runtime.expression.ExpressionEvaluator
evaluateExpression, resetPosisionCounter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p1

protected ValueExpression p1

p2

protected ValueExpression p2

p3

protected ValueExpression p3

p1Result

protected java.lang.Object p1Result

p2Result

protected java.lang.Object p2Result

p3Result

protected java.lang.Object p3Result

evaluator

protected ExpressionEvaluator evaluator
Constructor Detail

FunctionCallEvaluator

public FunctionCallEvaluator(Expression expression,
                             ExecutionEnvironment env,
                             RuleExecutor ownerRuleExecutor)
Method Detail

evaluateSimple

protected java.lang.Object evaluateSimple(java.lang.Object inputObject)
                                   throws MofScriptExecutionException
Specified by:
evaluateSimple in class SimpleExpressionEvaluator
Throws:
MofScriptExecutionException

evaluateParameterValues

protected void evaluateParameterValues(java.util.List parameters)
                                throws MofScriptExecutionException
Parameters:
parameters -
Throws:
MofScriptExecutionException

handleFunctionCall

protected java.lang.Object handleFunctionCall(FunctionCall f,
                                              java.lang.Object inputContext)

handleVariableFunctionCall

protected java.lang.Object handleVariableFunctionCall(java.lang.Object variable,
                                                      java.lang.String fName,
                                                      FunctionCall f)
                                               throws MofScriptExecutionException
Parameters:
variable -
fName -
f -
Returns:
Throws:
MofScriptExecutionException

handleOclGeneralFunction

protected java.lang.Object handleOclGeneralFunction(java.lang.Object variable,
                                                    java.lang.String fName,
                                                    FunctionCall f)
                                             throws MofScriptExecutionException
Parameters:
variable -
fName -
f -
Returns:
Throws:
MofScriptExecutionException

handleModelEscapeFunction

protected java.lang.Object handleModelEscapeFunction(java.lang.Object variable,
                                                     java.lang.String fName,
                                                     FunctionCall f)
                                              throws MofScriptExecutionException
Throws:
MofScriptExecutionException

isSystemFunction

protected boolean isSystemFunction(java.lang.String functionName)
Parameters:
functionName -
Returns:

handleSystemFunction

protected java.lang.Object handleSystemFunction(java.lang.String fName,
                                                FunctionCall f)
                                         throws MofScriptExecutionException
Throws:
MofScriptExecutionException

isTypeOf

public static java.lang.Boolean isTypeOf(org.eclipse.emf.ecore.EObject toCheck,
                                         java.lang.Object clazz)
Parameters:
toCheck -
clazz -
Returns:

isKindOf

public static java.lang.Boolean isKindOf(org.eclipse.emf.ecore.EObject toCheck,
                                         java.lang.Object clazz)