org.eclipse.ocl.examples.domain.values.impl
Class InvalidValueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.ocl.examples.domain.evaluation.DomainException
org.eclipse.ocl.examples.domain.values.impl.UndefinedValueImpl
org.eclipse.ocl.examples.domain.values.impl.InvalidValueException
- 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:
- EvaluationHaltedException
public class InvalidValueException
- extends UndefinedValueImpl
- implements InvalidValue
An InvalidValueException wraps an InvalidValue and is used to return the InvalidValue
to the caller. Exceptions are a
is thrown when an Invalid Value arises during
an evaluation, and when no EvaluationEnvironment is available to support
throwing an InvalidEvaluationException. When such an environment is
available the InvalidValueException is rethrown as an
InvalidEvaluationException.
* @generated NOT
- See Also:
- Serialized Form
| Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value |
INVALID_NAME |
| 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.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.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 |
InvalidValueException
public InvalidValueException(@Nullable
java.lang.Exception exception,
java.lang.String message)
InvalidValueException
public InvalidValueException(java.lang.String messageTemplate,
java.lang.Object... bindings)
InvalidValueException
public InvalidValueException(@NonNull
java.lang.Exception exception)
InvalidValueException
public InvalidValueException(@Nullable
java.lang.Exception exception,
java.lang.String messageTemplate,
java.lang.Object... bindings)
eStaticClass
protected org.eclipse.emf.ecore.EClass eStaticClass()
-
- Generated
asBagValue
@NonNull
public BagValue asBagValue()
- Specified by:
asBagValue in interface Value- Overrides:
asBagValue in class UndefinedValueImpl
asCollectionValue
@NonNull
public CollectionValue asCollectionValue()
- Specified by:
asCollectionValue in interface Value- Overrides:
asCollectionValue in class UndefinedValueImpl
asDouble
@NonNull
public java.lang.Double asDouble()
- Specified by:
asDouble in interface Value- Overrides:
asDouble in class UndefinedValueImpl
asEcoreObject
@Deprecated
@NonNull
public java.util.List<java.lang.Object> asEcoreObject()
- Deprecated.
- Description copied from interface:
Value
- Return the Ecore representation of this value.
An thrown exception for an invalid OCL value.
Java-null for a null OCL value
Objects for other things
- Specified by:
asEcoreObject in interface CollectionValue- Specified by:
asEcoreObject in interface Value
asEcoreObject
@NonNull
public java.util.List<java.lang.Object> asEcoreObject(@NonNull
IdResolver idResolver)
- Specified by:
asEcoreObject in interface CollectionValue- Specified by:
asEcoreObject in interface Value
asElement
public DomainElement asElement()
- Specified by:
asElement in interface Value
asInteger
@NonNull
public java.lang.Integer asInteger()
- Specified by:
asInteger in interface Value- Overrides:
asInteger in class UndefinedValueImpl
asIntegerValue
@NonNull
public IntegerValue asIntegerValue()
- Specified by:
asIntegerValue in interface Value- Overrides:
asIntegerValue in class UndefinedValueImpl
asNavigableObject
@NonNull
public org.eclipse.emf.ecore.EObject asNavigableObject()
- Specified by:
asNavigableObject in interface Value- Overrides:
asNavigableObject in class UndefinedValueImpl
asNumber
@NonNull
public java.lang.Number asNumber()
- Specified by:
asNumber in interface RealValue- Overrides:
asNumber in class UndefinedValueImpl
asObjectValue
@NonNull
public ObjectValue asObjectValue()
- Specified by:
asObjectValue in interface Value- Overrides:
asObjectValue in class UndefinedValueImpl
asOrderedSetValue
@NonNull
public OrderedSetValue asOrderedSetValue()
- Specified by:
asOrderedSetValue in interface Value- Overrides:
asOrderedSetValue in class UndefinedValueImpl
asRealValue
@NonNull
public RealValue asRealValue()
- Specified by:
asRealValue in interface Value- Overrides:
asRealValue in class UndefinedValueImpl
asSequenceValue
@NonNull
public SequenceValue asSequenceValue()
- Specified by:
asSequenceValue in interface Value- Overrides:
asSequenceValue in class UndefinedValueImpl
asSetValue
@NonNull
public SetValue asSetValue()
- Specified by:
asSetValue in interface Value- Overrides:
asSetValue in class UndefinedValueImpl
asUniqueCollectionValue
@NonNull
public UniqueCollectionValue asUniqueCollectionValue()
- Specified by:
asUniqueCollectionValue in interface Value- Overrides:
asUniqueCollectionValue in class UndefinedValueImpl
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
getType
@NonNull
public DomainType getType(@NonNull
DomainStandardLibrary standardLibrary)
getTypeId
@NonNull
public OclInvalidTypeId getTypeId()
- Description copied from interface:
Value
- Return the type of this value determined from its construction context. In the case of collections
this may differ from the actual type.
- Specified by:
getTypeId in interface CollectionValue- Specified by:
getTypeId in interface NullValue- Specified by:
getTypeId in interface TupleValue- Specified by:
getTypeId in interface Value- Specified by:
getTypeId in class UndefinedValueImpl
- Returns:
- its type
intValue
public int intValue()
- Specified by:
intValue in interface IntegerValue
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
isInvalid
public boolean isInvalid()
- Specified by:
isInvalid in interface Value
oclEquals
public boolean oclEquals(@NonNull
OCLValue thatValue)
- Description copied from interface:
OCLValue
- Return true if this is an equivalent OCL value to thatValue.
Note that the caller must check that the argument is an OCLValue and should also
check for the shortcut case that this == thatValue. Implementations are therefore
wasting time if they re-implement the shortcut.
- Specified by:
oclEquals in interface OCLValue
oclHashCode
public int oclHashCode()
- Specified by:
oclHashCode in interface OCLValue