org.eclipse.ocl.examples.domain.library
Class EvaluatorIterationManager
java.lang.Object
org.eclipse.ocl.examples.domain.library.AbstractIterationManager
org.eclipse.ocl.examples.domain.library.EvaluatorIterationManager
- All Implemented Interfaces:
- DomainIterationManager
- Direct Known Subclasses:
- EvaluatorMultipleIterationManager, EvaluatorSingleIterationManager
public abstract class EvaluatorIterationManager
- extends AbstractIterationManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
collectionValue
protected final CollectionValue collectionValue
body
protected final DomainExpression body
accumulatorVariable
protected final DomainTypedElement accumulatorVariable
EvaluatorIterationManager
public EvaluatorIterationManager(DomainEvaluator evaluator,
DomainExpression body,
CollectionValue collectionValue,
DomainTypedElement accumulatorVariable,
Value accumulatorValue)
EvaluatorIterationManager
public EvaluatorIterationManager(EvaluatorIterationManager iterationManager,
CollectionValue collectionValue)
createIterators
protected static EvaluatorIterationManager.ValueIterator[] createIterators(DomainTypedElement[] referredIterators,
DomainEvaluator evaluator,
CollectionValue collectionValue)
getAccumulatorValue
public Value getAccumulatorValue()
- Description copied from interface:
DomainIterationManager
- Get the current state of the accumulator.
evaluateBody
public Value evaluateBody()
- Description copied from interface:
DomainIterationManager
- Evaluate the iteration body for the current iterators and return the evaluation result.
This is used by non-iterate iteration that intervene between the body evaluation
and accumulator update.
getCollectionValue
public CollectionValue getCollectionValue()
getEvaluationEnvironment
public DomainEvaluationEnvironment getEvaluationEnvironment()
throwInvalidEvaluation
public NullValue throwInvalidEvaluation(java.lang.String message,
java.lang.Object... bindings)
throws InvalidEvaluationException
- Throws:
InvalidEvaluationException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
updateBody
public Value updateBody()
- Description copied from interface:
DomainIterationManager
- Evaluate the iteration body for the current iterators and update the accumulator
accordingly.
This implements the body of an iterate iteration for which the accumulator value may
be assigned to a completely independent value.
Returns null for the iteration to continue, non-null to terminate.