org.eclipse.mofscript.runtime
Class RuleExecutor

java.lang.Object
  extended by org.eclipse.mofscript.runtime.RuleExecutor
All Implemented Interfaces:
MofScriptExecuter
Direct Known Subclasses:
TraceabilityRuleExecutor

public class RuleExecutor
extends java.lang.Object
implements MofScriptExecuter

The RuleExecutor executes the rules

Author:
jol

Constructor Summary
RuleExecutor(TransformationRule rule, ExecutionManager execMgr)
          Constructor
 
Method Summary
 java.lang.Object executeRule()
          pre condition: Rule is set and environment is set
 ExecutionEnvironment getExecutionEnvironment()
           
static ExecutionManager getExecutionManager()
          Gets the ExecutionManager
static java.lang.String getObjectId(org.eclipse.emf.ecore.EObject obj)
           
 java.util.Hashtable getReferenceCache()
          Gets the Hashtable of cached refrences
 TransformationRule getRule()
           
 java.lang.Object getRuleReturnValue()
           
 StatementBlock getStatementBlock()
           
 boolean isReturning()
           
 void notifyReturn(java.lang.Object returnValue)
           
 void setExecutionEnvironment(ExecutionEnvironment env)
           
 void setRuleReturnValue(java.lang.Object value)
          Sets the rule_return_value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleExecutor

public RuleExecutor(TransformationRule rule,
                    ExecutionManager execMgr)
Constructor

Parameters:
rule -
execMgr -
Method Detail

getExecutionManager

public static ExecutionManager getExecutionManager()
Gets the ExecutionManager

Returns:

getReferenceCache

public java.util.Hashtable getReferenceCache()
Gets the Hashtable of cached refrences

Returns:

setExecutionEnvironment

public void setExecutionEnvironment(ExecutionEnvironment env)
Parameters:
env -

getExecutionEnvironment

public ExecutionEnvironment getExecutionEnvironment()
Returns:
the Environment

setRuleReturnValue

public void setRuleReturnValue(java.lang.Object value)
Sets the rule_return_value

Parameters:
value -

getRuleReturnValue

public java.lang.Object getRuleReturnValue()
Returns:
the rule_return_value

getRule

public TransformationRule getRule()
Returns:
the transformation rule

executeRule

public java.lang.Object executeRule()
                             throws MofScriptExecutionException
pre condition: Rule is set and environment is set

Throws:
MofScriptExecutionException

getObjectId

public static java.lang.String getObjectId(org.eclipse.emf.ecore.EObject obj)

getStatementBlock

public StatementBlock getStatementBlock()

notifyReturn

public void notifyReturn(java.lang.Object returnValue)

isReturning

public boolean isReturning()