public final class OCLStandardLibraryUtil extends Object
See the Environment class for a description of the generic type
parameters of this class.
| Modifier and Type | Field and Description |
|---|---|
static String |
PRODUCT_FIRST
The name of the tuple part carrying elements of the source collection in
a product operation.
|
static String |
PRODUCT_SECOND
The name of the tuple part carrying elements of the argument collection
in a product operation.
|
| Modifier and Type | Method and Description |
|---|---|
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createAnyTypeOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
OclAny type of
the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createBagIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the pre-defined iterators of the
Bag(T) type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createBagOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
Bag(T) type of
the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createBooleanOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
Boolean type
of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createCollectionIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the pre-defined iterators of the
Collection(T) type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createCollectionOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
Collection(T)
type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createIntegerOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
Integer type
of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createMessageTypeOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
OclMessage
type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createOrderedSetIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the pre-defined iterators of the
OrderedSet(T) type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createOrderedSetOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
OrderedSet(T)
type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createRealOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
Real type of
the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createSequenceIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the pre-defined iterators of the
Sequence(T) type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createSequenceOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
Sequence(T)
type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createSetIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the pre-defined iterators of the
Set(T) type of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createSetOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
Set(T) type of
the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createStringOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
String type of
the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createTypeTypeOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
OclType type
of the OCL Standard library. |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
createUnlimitedNaturalOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Utility method creating the operations of the
UnlimitedNatural type of the OCL Standard library. |
static <C> Collection<C> |
getAllSupertypes(Environment<?,C,?,?,?,?,?,?,?,?,?,?> env,
PredefinedType<?> type)
Queries all of the supertypes of a pre-defined type.
|
static int |
getOclAnyOperationCode(String operName)
Obtains the numeric code of the specified OclAny operaiton.
|
static int |
getOperationCode(String operName)
Obtains the numeric code of the specified pre-defined (by OCL) operaiton.
|
static String |
getOperationName(int opcode)
Returns the operation name corresponding to the opcode.
|
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
getResultTypeOf(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env,
C sourceType,
int opcode,
List<? extends TypedElement<C>> args)
Deprecated.
Use the
getResultTypeOf(Object, Environment, Object, int, List)
method, instead, which doesn't fail on the first problem |
static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> |
getResultTypeOf(Object problemObject,
Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env,
C sourceType,
int opcode,
List<? extends TypedElement<C>> args)
Obtains the result type of the specified operation from the OCL Standard
Library.
|
public static final String PRODUCT_FIRST
public static final String PRODUCT_SECOND
public static int getOperationCode(String operName)
operName - the operation namePredefinedType
interface), or 0 if the operation name is not a
pre-defined operationgetOperationName(int)public static int getOclAnyOperationCode(String operName)
operName - the operation namePredefinedType
interface), or 0 if the operation name is not an
operation of the OclAny typepublic static String getOperationName(int opcode)
opcode - an operation codenull if the
code is not one defined by the PredefinedType interfacegetOperationCode(String)@Deprecated public static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> C getResultTypeOf(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env, C sourceType, int opcode, List<? extends TypedElement<C>> args) throws SemanticException
getResultTypeOf(Object, Environment, Object, int, List)
method, instead, which doesn't fail on the first problemenv - an OCL environment (indicating the metamodel binding)sourceType - the type of the operation source (object on which the
operation is called)opcode - the operation's codeargs - the arguments of the operation call, as expressions or
variablesSemanticException - if any of the argument types does not correspond to the
source type and/or expected parameter types of the operationgetOperationCode(String)public static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> C getResultTypeOf(Object problemObject, Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env, C sourceType, int opcode, List<? extends TypedElement<C>> args)
env - an OCL environment (indicating the metamodel binding)sourceType - the type of the operation source (object on which the
operation is called)opcode - the operation's codeargs - the arguments of the operation call, as expressions or
variablesgetOperationCode(String)public static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createAnyTypeOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
OclAny type of
the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the OclAny.env - an OCL environmentOclAny operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createTypeTypeOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
OclType type
of the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the OclType.env - an OCL environmentOclType operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createMessageTypeOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
OclMessage
type of the OCL Standard library. This is useful for implementors of
metamodel bindings (Environments) to initialize their
implementations of the OclMessage.env - an OCL environmentOclMessage operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createStringOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
String type of
the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the String.env - an OCL environmentString operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createRealOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Real type of
the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the Real.env - an OCL environmentReal operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createIntegerOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Integer type
of the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the Integer.env - an OCL environmentInteger operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createUnlimitedNaturalOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
UnlimitedNatural type of the OCL Standard library. This is
useful for implementors of metamodel bindings (Environments) to
initialize their implementations of the Integer.env - an OCL environmentUnlimitedNatural operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createBooleanOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Boolean type
of the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the Boolean.env - an OCL environmentBoolean operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createCollectionOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Collection(T)
type of the OCL Standard library. This is useful for implementors of
metamodel bindings (Environments) to initialize their
implementations of the Collection(T).env - an OCL environmentCollection(T) operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createSetOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Set(T) type of
the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the Set(T).env - an OCL environmentSet(T) operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createOrderedSetOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
OrderedSet(T)
type of the OCL Standard library. This is useful for implementors of
metamodel bindings (Environments) to initialize their
implementations of the OrderedSet(T).env - an OCL environmentOrderedSet(T) operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createBagOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Bag(T) type of
the OCL Standard library. This is useful for implementors of metamodel
bindings (Environments) to initialize their implementations of
the Bag(T).env - an OCL environmentBag(T) operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createSequenceOperations(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Sequence(T)
type of the OCL Standard library. This is useful for implementors of
metamodel bindings (Environments) to initialize their
implementations of the Sequence(T).env - an OCL environmentSequence(T) operationspublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createCollectionIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Collection(T) type of the OCL Standard library. This is
useful for implementors of metamodel bindings (Environments) to
initialize their implementations of the Collection(T).env - an OCL environmentCollection(T) typepublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createSetIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Set(T) type of the OCL Standard library. This is useful for
implementors of metamodel bindings (Environments) to initialize
their implementations of the Set(T).env - an OCL environmentSet(T) typepublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createOrderedSetIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
OrderedSet(T) type of the OCL Standard library. This is
useful for implementors of metamodel bindings (Environments) to
initialize their implementations of the OrderedSet(T).env - an OCL environmentOrderedSet(T) typepublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createBagIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Bag(T) type of the OCL Standard library. This is useful for
implementors of metamodel bindings (Environments) to initialize
their implementations of the Bag(T).env - an OCL environmentBag(T) typepublic static <PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> List<O> createSequenceIterators(Environment<PK,C,O,P,EL,PM,ST,COA,SSA,CT,CLS,E> env)
Sequence(T) type of the OCL Standard library. This is useful
for implementors of metamodel bindings (Environments) to
initialize their implementations of the Sequence(T).env - an OCL environmentSequence(T) typepublic static <C> Collection<C> getAllSupertypes(Environment<?,C,?,?,?,?,?,?,?,?,?,?> env, PredefinedType<?> type)
env - the contextual environmenttype - an OCL re-defined typeCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.