org.eclipse.ocl.examples.domain.library
Class AbstractUntypedTernaryOperation
java.lang.Object
org.eclipse.ocl.examples.domain.values.util.ValuesUtil
org.eclipse.ocl.examples.domain.library.AbstractFeature
org.eclipse.ocl.examples.domain.library.AbstractOperation
org.eclipse.ocl.examples.domain.library.AbstractTernaryOperation
org.eclipse.ocl.examples.domain.library.AbstractUntypedTernaryOperation
- All Implemented Interfaces:
- LibraryFeature, LibraryOperation, LibraryTernaryOperation, LibraryUntypedOperation, LibraryUntypedTernaryOperation
- Direct Known Subclasses:
- AbstractSimpleTernaryOperation
public abstract class AbstractUntypedTernaryOperation
- extends AbstractTernaryOperation
- implements LibraryUntypedTernaryOperation
AbstractUntypedTernaryOperation defines the default implementation of a ternary operation redirecting the
type-id invocation to the type-id-less form.
Fields inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil |
EMPTY_BAG, EMPTY_SET, FALSE_VALUE, INTEGER_MAX_VALUE, INTEGER_MIN_VALUE, INVALID_VALUE, LONG_MAX_VALUE, LONG_MIN_VALUE, NULL_STRING, NULL_VALUE, ONE_VALUE, TRUE_VALUE, UNLIMITED_VALUE, ZERO_VALUE |
Method Summary |
java.lang.Object |
dispatch(DomainEvaluator evaluator,
DomainCallExp callExp,
java.lang.Object sourceValue)
Return the result of evaluating callExp and its arguments upon sourceValue within the environment
provided by evaluator. |
abstract java.lang.Object |
evaluate(DomainEvaluator evaluator,
java.lang.Object sourceValue,
java.lang.Object firstArgumentValue,
java.lang.Object secondArgumentValue)
|
java.lang.Object |
evaluate(DomainEvaluator evaluator,
TypeId returnTypeId,
java.lang.Object sourceValue,
java.lang.Object firstArgumentValue,
java.lang.Object secondArgumentValue)
Return the result of evaluating the operation on source with arg1 and arg2. |
Methods inherited from class org.eclipse.ocl.examples.domain.values.util.ValuesUtil |
asBagValue, asBoolean, asCollectionType, asCollectionValue, asInteger, asIntegerValue, asMetaclass, asNavigableObject, asObject, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asTupleValue, asType, asUniqueCollectionValue, asUnlimitedNaturalValue, asValue, bigDecimalValueOf, bigIntegerValueOf, characterValueOf, createBagAccumulatorValue, createBagOfEach, createBagRange, createBagValue, createCollectionAccumulatorValue, createInvalidValue, createObjectValue, createOrderedSetAccumulatorValue, createOrderedSetOfEach, createOrderedSetRange, createOrderedSetValue, createRange, createSequenceAccumulatorValue, createSequenceOfEach, createSequenceRange, createSequenceRange, createSequenceValue, createSetAccumulatorValue, createSetOfEach, createSetRange, createSetValue, createTupleOfEach, createTupleValue, createTupleValue, createTypeValue, getEcoreNumber, getTypeName, initAllStatics, integerValueOf, integerValueOf, integerValueOf, integerValueOf, integerValueOf, isBoxed, isCollectionValue, isIntegerNumber, isIntegerValue, isRealNumber, isUnboxed, isUnlimited, oclToString, realValueOf, realValueOf, realValueOf, realValueOf, realValueOf, stringValueOf, throwBooleanInvalidValueException, throwInvalidValueException, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractUntypedTernaryOperation
public AbstractUntypedTernaryOperation()
dispatch
@Nullable
public java.lang.Object dispatch(@NonNull
DomainEvaluator evaluator,
@NonNull
DomainCallExp callExp,
@Nullable
java.lang.Object sourceValue)
- Description copied from interface:
LibraryOperation
- Return the result of evaluating callExp and its arguments upon sourceValue within the environment
provided by evaluator. An invalid return may be indicated by throwing an exception,
returning Java null, or returning OCL invalid.
This invocation evaluates the arguments as required. Derived implementations may implement short circuit processing
to skip redundant evlaution of later arguments.
Invocations may bypass dispatch if a derived LibraryOperation such as LibrarySimpleBinaryOperation
makes its internal evaluate signature available for use after a type test and cast.
- Specified by:
dispatch
in interface LibraryOperation
- Overrides:
dispatch
in class AbstractTernaryOperation
evaluate
@Nullable
public java.lang.Object evaluate(@NonNull
DomainEvaluator evaluator,
@NonNull
TypeId returnTypeId,
@Nullable
java.lang.Object sourceValue,
@Nullable
java.lang.Object firstArgumentValue,
@Nullable
java.lang.Object secondArgumentValue)
- Description copied from interface:
LibraryTernaryOperation
- Return the result of evaluating the operation on source with arg1 and arg2.
An invalid return may be indicated by throwing an exception returning Java null or OCL invalid.
- Specified by:
evaluate
in interface LibraryTernaryOperation
- Specified by:
evaluate
in class AbstractTernaryOperation
- Returns:
- the evaluated value
evaluate
@Nullable
public abstract java.lang.Object evaluate(@NonNull
DomainEvaluator evaluator,
@Nullable
java.lang.Object sourceValue,
@Nullable
java.lang.Object firstArgumentValue,
@Nullable
java.lang.Object secondArgumentValue)
- Specified by:
evaluate
in interface LibraryUntypedTernaryOperation