org.eclipse.ocl.examples.library.executor
Class ExecutorManager
java.lang.Object
org.eclipse.ocl.examples.library.executor.ExecutorManager
- All Implemented Interfaces:
- DomainEvaluator
- Direct Known Subclasses:
- EcoreExecutorManager, PivotExecutorManager
public abstract class ExecutorManager
- extends java.lang.Object
- implements DomainEvaluator
Method Summary |
Value |
evaluate(DomainExpression body)
|
Value |
evaluateIteration(DomainType returnType,
CollectionValue sourceVal,
DomainTypedElement accumulator,
DomainExpression body,
DomainTypedElement[] iterators)
|
DomainEvaluationEnvironment |
getEvaluationEnvironment()
|
DomainEvaluationVisitor |
getEvaluationVisitor()
|
DomainModelManager |
getModelManager()
Return the manager of all model instances for use by allInstances() and hidden opposite support. |
ValueFactory |
getValueFactory()
Return the factory for values and indirectly for types. |
boolean |
isCanceled()
Return true if the evaluation has been canceled. |
void |
setCanceled(boolean isCanceled)
Request cancelation of the current the evaluation, or reset the request for a new evaluation. |
NullValue |
throwInvalidEvaluation(InvalidValueException e)
|
NullValue |
throwInvalidEvaluation(java.lang.Throwable e,
DomainExpression expression,
java.lang.Object context,
java.lang.String message,
java.lang.Object... bindings)
|
DomainType |
typeOf(Value value,
Value... values)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
valueFactory
protected final ValueFactory valueFactory
ExecutorManager
public ExecutorManager(ValueFactory valueFactory)
evaluateIteration
public Value evaluateIteration(DomainType returnType,
CollectionValue sourceVal,
DomainTypedElement accumulator,
DomainExpression body,
DomainTypedElement[] iterators)
getValueFactory
public ValueFactory getValueFactory()
- Description copied from interface:
DomainEvaluator
- Return the factory for values and indirectly for types.
- Specified by:
getValueFactory
in interface DomainEvaluator
isCanceled
public boolean isCanceled()
- Description copied from interface:
DomainEvaluator
- Return true if the evaluation has been canceled.
- Specified by:
isCanceled
in interface DomainEvaluator
setCanceled
public void setCanceled(boolean isCanceled)
- Description copied from interface:
DomainEvaluator
- Request cancelation of the current the evaluation, or reset the request for a new evaluation.
Cancelation occurs by throwing an
EvaluationHaltedException
when #getValuefactory()
is next invoked.
- Specified by:
setCanceled
in interface DomainEvaluator
typeOf
public DomainType typeOf(Value value,
Value... values)
evaluate
public Value evaluate(DomainExpression body)
- Specified by:
evaluate
in interface DomainEvaluator
getEvaluationEnvironment
public DomainEvaluationEnvironment getEvaluationEnvironment()
- Specified by:
getEvaluationEnvironment
in interface DomainEvaluator
getEvaluationVisitor
public DomainEvaluationVisitor getEvaluationVisitor()
getModelManager
public DomainModelManager getModelManager()
- Description copied from interface:
DomainEvaluator
- Return the manager of all model instances for use by allInstances() and hidden opposite support.
- Specified by:
getModelManager
in interface DomainEvaluator
throwInvalidEvaluation
public NullValue throwInvalidEvaluation(InvalidValueException e)
throws InvalidEvaluationException
- Specified by:
throwInvalidEvaluation
in interface DomainEvaluator
- Throws:
InvalidEvaluationException
throwInvalidEvaluation
public NullValue throwInvalidEvaluation(java.lang.Throwable e,
DomainExpression expression,
java.lang.Object context,
java.lang.String message,
java.lang.Object... bindings)
throws InvalidEvaluationException
- Specified by:
throwInvalidEvaluation
in interface DomainEvaluator
- Throws:
InvalidEvaluationException