org.eclipse.ocl.examples.domain.evaluation
Class EvaluationHaltedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eclipse.ocl.examples.domain.evaluation.DomainException
                  extended by org.eclipse.ocl.examples.domain.values.impl.UndefinedValueImpl
                      extended by org.eclipse.ocl.examples.domain.values.impl.InvalidValueException
                          extended by org.eclipse.ocl.examples.domain.evaluation.EvaluationHaltedException
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RealValue>, java.lang.Iterable<java.lang.Object>, BagValue, CollectionValue, IntegerValue, InvalidValue, NullValue, ObjectValue, OCLValue, OrderedCollectionValue, OrderedSetValue, RealValue, SequenceValue, SetValue, TupleValue, UniqueCollectionValue, UnlimitedValue, Value
Direct Known Subclasses:
VMRuntimeException

public class EvaluationHaltedException
extends InvalidValueException

Exception indicating a managed interruption of evaluation.

Other languages that extend OCL may need to stop evaluation at any point. This can be done at expression level granularity by throwing this exception during evaluation. The evaluation visitor and other participants recognizes this exception as a protocol for interrupting its execution and ensure its propagated to the top level caller.

A diagnostic object can be attached, so arbitrary information about the current execution context can be carried.

Author:
radvorak
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.IntegerValue
IntegerValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.BagValue
BagValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.OrderedSetValue
OrderedSetValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.SequenceValue
SequenceValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.SetValue
SetValue.Accumulator
 
Field Summary
 
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value
INVALID_NAME
 
Constructor Summary
EvaluationHaltedException(org.eclipse.emf.common.util.Diagnostic diagnostic)
          Initializes me with a diagnostic describing the nature of stopping evaluation.
EvaluationHaltedException(java.lang.String message)
          Initializes me with a message describing the nature of stopping evaluation.
EvaluationHaltedException(java.lang.String message, java.lang.Throwable cause)
          Initializes me with a message and diagnostic describing the nature of stopping evaluation.
 
Method Summary
 org.eclipse.emf.common.util.Diagnostic getDiagnostic()
          Obtains the diagnostic providing further information about this exception.
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.InvalidValueException
asBagValue, asCollectionValue, asDouble, asEcoreObject, asEcoreObject, asElement, asInteger, asIntegerValue, asNavigableObject, asNumber, asObjectValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asUniqueCollectionValue, equals, eStaticClass, getType, getTypeId, hashCode, intValue, isInvalid, oclEquals, oclHashCode
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.UndefinedValueImpl
abs, addInteger, addReal, append, appendAll, asCollection, asEcoreObjects, asList, asObject, asOrderedCollectionValue, asTupleValue, asUnlimitedNaturalValue, at, bigDecimalValue, bigIntegerValue, commutatedAdd, commutatedDiv, commutatedDivide, commutatedMod, commutatedMultiply, commutatedSubtract, compareTo, compareToInteger, compareToReal, compareToUnlimited, count, createNew, div, divideInteger, divideReal, divInteger, divUnlimited, doubleValue, excludes, excludesAll, excluding, excludingAll, first, flatten, flatten, floor, getElement, getElements, getInstanceType, getKind, getObject, getTypeName, getValue, getValue, includes, includesAll, including, includingAll, indexOf, insertAt, intersection, intSize, isEmpty, isFalse, isIntegerValue, isOrdered, isTrue, isUndefined, isUnique, isUnlimited, isUnlimitedNatural, iterable, iterator, last, max, maxInteger, maxReal, maxUnlimited, min, minInteger, minReal, minUnlimited, minus, modInteger, modUnlimited, multiplyInteger, multiplyReal, negate, notEmpty, prepend, prependAll, product, reverse, round, signum, size, sort, stringValue, subOrderedSet, subSequence, subtractInteger, subtractReal, symmetricDifference, toInvalidValue, toSequenceValue, toString, union
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.NullValue
negate
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.ObjectValue
getObject
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.IntegerValue
addInteger, commutatedDiv, commutatedMod, compareToInteger, divideInteger, divInteger, divUnlimited, isUnlimitedNatural, maxInteger, minInteger, modInteger, modUnlimited, multiplyInteger, subtractInteger
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.RealValue
abs, addReal, bigDecimalValue, bigIntegerValue, commutatedAdd, commutatedDivide, commutatedMultiply, commutatedSubtract, compareToReal, compareToUnlimited, divideReal, doubleValue, floor, isIntegerValue, isUnlimited, max, maxReal, maxUnlimited, min, minReal, minUnlimited, multiplyReal, round, signum, subtractReal
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OrderedSetValue
subOrderedSet
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.SequenceValue
subSequence
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OrderedCollectionValue
append, appendAll, at, first, indexOf, insertAt, last, prepend, prependAll, reverse
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.UniqueCollectionValue
minus, symmetricDifference
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.CollectionValue
asCollection, asEcoreObjects, count, excludes, excludesAll, excluding, excludingAll, flatten, flatten, getElements, getKind, includes, includesAll, including, includingAll, intersection, intSize, isEmpty, isOrdered, isUnique, iterable, iterator, notEmpty, product, size, sort, toSequenceValue, union
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value
asObject, asOrderedCollectionValue, asTupleValue, asUnlimitedNaturalValue, isUndefined, toString
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.TupleValue
getValue, getValue
 

Constructor Detail

EvaluationHaltedException

public EvaluationHaltedException(java.lang.String message)
Initializes me with a message describing the nature of stopping evaluation.

Parameters:
message - the message text

EvaluationHaltedException

public EvaluationHaltedException(org.eclipse.emf.common.util.Diagnostic diagnostic)
Initializes me with a diagnostic describing the nature of stopping evaluation.

Parameters:
diagnostic - non-null diagnostic object

EvaluationHaltedException

public EvaluationHaltedException(java.lang.String message,
                                 java.lang.Throwable cause)
Initializes me with a message and diagnostic describing the nature of stopping evaluation.

Parameters:
message - a user-friendly message
cause - the cause of the evaluation failure
Method Detail

getDiagnostic

public org.eclipse.emf.common.util.Diagnostic getDiagnostic()
Obtains the diagnostic providing further information about this exception.

Returns:
the diagnostic object