## org.eclipse.ocl.util
Class TypeUtil

    java.lang.Object
      org.eclipse.ocl.util.TypeUtil

    public class TypeUtil

extends Object

Static utilities for introspecting OCL types.

See the `Environment` class for a description of the generic type parameters of this class's methods.

Method Summary

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> void`

`

`checkMutuallyComparable(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2, int opcode)`
Deprecated. Use the `checkMutuallyComparable(Object, Environment, Object, Object, int)` method, instead

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean`

`

`checkMutuallyComparable(Object problemObject, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2, int opcode)`
Checks whether two types are mutually comparable in the determination of the applicability of = and <> operations.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`commonSuperType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)`
Deprecated. Use the `commonSuperType(Object, Environment, Object, Object)` method, instead.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`commonSuperType(Object problemObject, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)`
Get the common supertype of two types.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean`

`

`compatibleTypeMatch(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)`
Compare two types.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean`

`

`exactTypeMatch(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)`
Compare two types.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> P`

`

`findAttribute(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, String name)`
Finds the most specific (re)definition of an attribute in the specified classifier.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> O`

`

`findOperationMatching(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, String name, List<? extends TypedElement<C>> args)`
Finds the most specific (re)definition of an operation by signature in the specified classifier.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`findSignalMatching(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C receiver, List<C> signals, String name, List<? extends TypedElement<C>> args)`
Find a matching signal in the specified list.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> List<P>`

`

`getAttributes(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner)`
Obtains all of the OCL attributes applicable to the specified owner type, including any that were defined in the OCL environment as additional attributes.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> List<O>`

`

`getOperations(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner)`
Obtains all of the OCL operations applicable to the specified owner type, including any that were defined in the OCL environment as additional operations.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`getPropertyType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, P property)`
Gets the type of a property, accounting for the fact that we may be navigating to it from an association class (in which the member ends of an association always have multiplicity 1) or not.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> int`

`

`getRelationship(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)`
Queries the relationship, according to generalizations, of two types.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`getResultType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, O oper)`
Deprecated. Use the `getResultType(Object, Environment, Object, Object)` method, instead

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`getResultType(Object problemObject, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, O oper)`
Deprecated. Use the `#getResultTypeObject, Environment, Object, Object, List` method, instead, which resolves generic operation signatures against actual arguments

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`getResultType(Object problemObject, Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, O operation, List<? extends TypedElement<C>> args)`
Obtains the effective result type of the specified operation, which may or may not have parameters type by generic type variables.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean`

`

`isOclAnyOperation(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, O operation)`
Queries whether an operation is defined by the `OclAny` type.

`static

`<C> boolean`

`

`isStandardLibraryFeature(Environment<?,C,?,?,?,?,?,?,?,?,?,?> env, C owner, Object feature)`
Queries whether the specified feature (operation or attribute), as applied to a particular `owner` classifier, is defined by the standard library or not (in which case it would, presumably, be user-defined).

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean`

`

`matchArgs(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, List<?> paramsOrProperties, List<? extends TypedElement<C>> args)`
Compares an actual argument list against the signature of an operation or a signal.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveBagType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)`
Resolves a `Bag` type against the baf types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveCollectionType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, CollectionKind kind, C elementType)`
Resolves a collection type against the collection types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> O`

`

`resolveGenericSignature(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C owner, O oper)`
Resolves the signature of a generic operation (where it has parameters of type and/or `T` or `T2`) against the source type of the operation, as appropriate.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveOperationMessageType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, O operation)`
Resolves an operation message type against the message types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveOrderedSetType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)`
Resolves a `OrderedSet` type against the types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveSequenceType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)`
Resolves a `Sequence` type against the sequence types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveSetType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C elementType)`
Resolves a `Set` type against the set types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveSignalMessageType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C signal)`
Resolves a signal message type against the message types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveTupleType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, EList<? extends TypedElement<C>> parts)`
Resolves a tuple type against the tuple types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type)`
Resolves the specified type against the model-based types defined by the specified environment's type resolver, for consistency with the environment (especially for persistence).

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C`

`

`resolveTypeType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type)`
Resolves a tuple-type against the tuple-types previously generated and persisted in the environment.

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean`

`

`type1AsType2(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)`
Deprecated. Use the `compatibleTypeMatch(Environment, Object, Object)` method, instead, to check whether the cast is acceptable

`static

`<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> int`

`

`typeCompare(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env, C type1, C type2)`
Deprecated. Use the `getRelationship(Environment, Object, Object)` method, instead.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### isOclAnyOperation

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean isOclAnyOperation(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                O operation)

  Queries whether an operation is defined by the `OclAny` type.

  Parameters:
    `env` - the OCL environment
    `operation` - an operation
  Returns:
    `true` if it is defined by `OclAny`; `false`, otherwise

### findOperationMatching

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> O findOperationMatching(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                              C owner,
                                                                              String name,
                                                                              List<? extends TypedElement<C>> args)

  Finds the most specific (re)definition of an operation by signature in the specified classifier.

  Parameters:
    `env` - the OCL environment
    `owner` - the classifier to search
    `name` - the name of the operation
    `args` - a list of arguments to match against the operation signature, as either expressions or variables
  Returns:
    the matching operation, or `null` if not found

### findSignalMatching

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C findSignalMatching(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                           C receiver,
                                                                           List<C> signals,
                                                                           String name,
                                                                           List<? extends TypedElement<C>> args)

  Find a matching signal in the specified list.

  Parameters:
    `env` - the OCL environment
    `receiver` - the type that receives the signal
    `signals` - the signals to search
    `name` - name of signal to find
    `args` - list of arguments to match against the signal signature
  Returns:
    the matching signal, or `null` if not found

### getOperations

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> List<O> getOperations(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                            C owner)

  Obtains all of the OCL operations applicable to the specified owner type, including any that were defined in the OCL environment as additional operations.

  Parameters:
    `env` - the OCL environment
    `owner` - the operation owner type
  Returns:
    an unmodifiable list of its operations

### findAttribute

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> P findAttribute(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                      C owner,
                                                                      String name)

  Finds the most specific (re)definition of an attribute in the specified classifier.

  Parameters:
    `env` - the OCL environment
    `owner` - the classifier to search
    `name` - the name of the operation
    `args` - a list of arguments to match against the operation signature, as either expressions or variables
  Returns:
    the matching operation, or `null` if not found
  Since:
    1.3

### getAttributes

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> List<P> getAttributes(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                            C owner)

  Obtains all of the OCL attributes applicable to the specified owner type, including any that were defined in the OCL environment as additional attributes.

  Parameters:
    `env` - the OCL environment
    `owner` - the attribute owner type
  Returns:
    an unmodifiable list of its attributes

### matchArgs

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean matchArgs(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                        C owner,
                                                                        List<?> paramsOrProperties,
                                                                        List<? extends TypedElement<C>> args)

  Compares an actual argument list against the signature of an operation or a signal.

  Parameters:
    `env` - the OCL environment
    `owner` - the type that owns the operation
    `params` - the operation parameters or signal attributes to match against the arguments
    `args` - a list of `OCLExpression`s or `Variable`s
  Returns:
    true or false
  Since:
    1.3

### resolveGenericSignature

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> O resolveGenericSignature(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                C owner,
                                                                                O oper)

  Resolves the signature of a generic operation (where it has parameters of type and/or `T` or `T2`) against the source type of the operation, as appropriate.

  Parameters:
    `env` - the OCL environment
    `owner` - the operation source type
    `oper` - the generic operation
  Returns:
    the resolved parameter type

### getPropertyType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C getPropertyType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                        C owner,
                                                                        P property)

  Gets the type of a property, accounting for the fact that we may be navigating to it from an association class (in which the member ends of an association always have multiplicity 1) or not.

  Parameters:
    `env` - the OCL environment
    `owner` - the source of the navigation of the property, which may be an association class (the interesting scenario)
    `property` - the property to navigate
  Returns:
    the effective type of the property, which may not be a collection type despite its declared multiplicity in the association class case

### getResultType

    @Deprecated
    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C getResultType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                 C owner,
                                                                                 O oper)

  Deprecated. Use the `getResultType(Object, Environment, Object, Object)` method, instead

  Obtains the result type of the specified operation, which in the case of collection operations sometimes depends on the element type of the source collection.

  Parameters:
    `env` - the OCL environment
    `owner` - the type of the operation call source
    `oper` - the operation
  Returns:
    the operation's effect result type

### getResultType

    @Deprecated
    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C getResultType(Object problemObject,
                                                                                 Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                 C owner,
                                                                                 O oper)

  Deprecated. Use the `#getResultTypeObject, Environment, Object, Object, List` method, instead, which resolves generic operation signatures against actual arguments

  Obtains the result type of the specified operation, which in the case of collection operations sometimes depends on the element type of the source collection.

  Parameters:
    `problemObject` - the object which could have problems.
    `env` - the OCL environment
    `owner` - the type of the operation call source
    `oper` - the operation
  Returns:
    the operation's effect result type

### getResultType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C getResultType(Object problemObject,
                                                                      Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                      C owner,
                                                                      O operation,
                                                                      List<? extends TypedElement<C>> args)

  Obtains the effective result type of the specified operation, which may or may not have parameters type by generic type variables. Many of the OCL Standard Library operations are either generic themselves or defined by generic types, so the return results depend on the argument and source types.

  Parameters:
    `problemObject` - the context object on which to report any problem that we may find in computing the result type. Usually this is some abstract or concrete syntax tree node
    `env` - the OCL environment
    `owner` - the owner of the operation (type on which the operation is called)
    `operation` - the operation signature
    `args` - the arguments of the operation call, which are expressions or variables
  Returns:
    the effective result type of the corresponding operation, or null after reporting a problem if any of the argument types do not correspond to the source type and/or expected parameter types of the operation
  Since:
    1.3

### type1AsType2

    @Deprecated
    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean type1AsType2(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                      C type1,
                                                                                      C type2)
                                throws SemanticException

  Deprecated. Use the `compatibleTypeMatch(Environment, Object, Object)` method, instead, to check whether the cast is acceptable

  Casts a value of one type as another type, if compatible.

  Parameters:
    `env` - the OCL environment
    `type1` - a type
    `type2` - another type
  Returns:
    `true` if the cast is successful
  Throws:
    `SemanticException` - if the cast fails (because the types are not conformant)

### exactTypeMatch

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean exactTypeMatch(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                             C type1,
                                                                             C type2)

  Compare two types. Returns true if types are exactly equal, false otherwise.

  Parameters:
    `env` - the OCL environment
    `type1` - a type
    `type2` - another type
  Returns:
    true if the same type

### compatibleTypeMatch

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean compatibleTypeMatch(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                  C type1,
                                                                                  C type2)

  Compare two types. Returns true if types are compatible, false otherwise.

  Parameters:
    `env` - the OCL environment
    `type1` - a type
    `type2` - another type
  Returns:
    true if the same type or type1 is a strict subtype of type2.

### typeCompare

    @Deprecated
    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> int typeCompare(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                 C type1,
                                                                                 C type2)

  Deprecated. Use the `getRelationship(Environment, Object, Object)` method, instead.

  Compare two types. Returns 0 if types are exactly equal, -1 if type1 conforms to type2 (type1 is a subtype of type2) 1 if type2 conforms to type1 (type2 is a subtype of type1). Fails if there is no type conformance.

  Parameters:
    `type1` - a type
    `type2` - another type
  Returns:
    the ordering key
  Throws:
    `IllegalArgumentException` - if the types are not conformant one way or the other

### checkMutuallyComparable

    @Deprecated
    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> void checkMutuallyComparable(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                              C type1,
                                                                                              C type2,
                                                                                              int opcode)
                                        throws SemanticException

  Deprecated. Use the `checkMutuallyComparable(Object, Environment, Object, Object, int)` method, instead

  Checks whether two types are mutually comparable in the determination of the applicability of = and <> operations.

  Parameters:
    `env` - the OCL environment
    `type1` - a type
    `type2` - another type
    `opcode` - the operation code
  Throws:
    `SemanticException` - if the types are not comparable

### checkMutuallyComparable

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> boolean checkMutuallyComparable(Object problemObject,
                                                                                      Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                      C type1,
                                                                                      C type2,
                                                                                      int opcode)

  Checks whether two types are mutually comparable in the determination of the applicability of = and <> operations.

  Parameters:
    `problemObject` - the object which could have problems.
    `env` - the OCL environment
    `type1` - a type
    `type2` - another type
    `opcode` - the operation code
  Returns:
    false if the types are not comparable

### getRelationship

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> int getRelationship(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                          C type1,
                                                                          C type2)

  Queries the relationship, according to generalizations, of two types. This operation accounts for the OCL Standard Library types, which the otherwise similar `UMLReflection.getRelationship(Object, Object)` method does not.

  Parameters:
    `env` - the OCL environment
    `type1` - a type
    `type2` - another type
  Returns:
    the nature of their hierarchical relationship of `type1` to `type2`, as enumerated in the `UMLReflection` interface
  See Also:
    `UMLReflection.getRelationship(Object, Object)`

### commonSuperType

    @Deprecated
    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C commonSuperType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                   C type1,
                                                                                   C type2)
                             throws SemanticException

  Deprecated. Use the `commonSuperType(Object, Environment, Object, Object)` method, instead.

  Get the common supertype of two types. This operation accounts for the OCL Standard Library types, which the otherwise similar `UMLReflection.getCommonSuperType(Object, Object)` method does not.

  Parameters:
    `type1` - a type
    `type2` - another type
  Returns:
    their common supertype, if any, null if the two types have no common supertype
  Throws:
    `SemanticException` - if the two types have no common supertype

### commonSuperType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C commonSuperType(Object problemObject,
                                                                        Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                        C type1,
                                                                        C type2)

  Get the common supertype of two types. This operation accounts for the OCL Standard Library types, which the otherwise similar `UMLReflection.getCommonSuperType(Object, Object)` method does not.

  Parameters:
    `problemObject` - the object which could have problems.
    `env` - the OCL environment
    `type1` - a type
    `type2` - another type
  Returns:
    their common supertype, if any, null if the two types have no common supertype
  See Also:
    `UMLReflection.getCommonSuperType(Object, Object)`

### resolveType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                    C type)

  Resolves the specified type against the model-based types defined by the specified environment's type resolver, for consistency with the environment (especially for persistence).

  Parameters:
    `env` - the OCL environment
    `type` - the type to resolve
  Returns:
    the environment's corresponding type

### resolveSetType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveSetType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                       C elementType)

  Resolves a `Set` type against the set types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `elementType` - the element type of the set type to resolve
  Returns:
    the environment's corresponding type

### resolveOrderedSetType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveOrderedSetType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                              C elementType)

  Resolves a `OrderedSet` type against the types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `elementType` - the element type of the ordered set type to resolve
  Returns:
    the environment's corresponding type

### resolveBagType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveBagType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                       C elementType)

  Resolves a `Bag` type against the baf types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `elementType` - the element type of the baf type to resolve
  Returns:
    the environment's corresponding type

### resolveSequenceType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveSequenceType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                            C elementType)

  Resolves a `Sequence` type against the sequence types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `elementType` - the element type of the sequence type to resolve
  Returns:
    the environment's corresponding type

### resolveCollectionType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveCollectionType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                              CollectionKind kind,
                                                                              C elementType)

  Resolves a collection type against the collection types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `kind` - the collection kind to resolve
    `elementType` - the element type of the collection type to resolve
  Returns:
    the environment's corresponding type

### resolveTupleType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveTupleType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                         EList<? extends TypedElement<C>> parts)

  Resolves a tuple type against the tuple types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `parts` - the expressions or variables describing the parts of the tuple type to resolve
  Returns:
    the environment's corresponding type

### resolveTypeType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveTypeType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                        C type)

  Resolves a tuple-type against the tuple-types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `type` - the referred type of the type-type to resolve
  Returns:
    the environment's corresponding type

### resolveOperationMessageType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveOperationMessageType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                    O operation)

  Resolves an operation message type against the message types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `operation` - the operation referenced by the message type to resolve
  Returns:
    the environment's corresponding type

### resolveSignalMessageType

    public static <PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> C resolveSignalMessageType(Environment<PK,C,O,P,EL,PM,S,COA,SSA,CT,CLS,E> env,
                                                                                 C signal)

  Resolves a signal message type against the message types previously generated and persisted in the environment.

  Parameters:
    `env` - the OCL environment
    `signal` - the signal referenced by the message type to resolve
  Returns:
    the environment's corresponding type

### isStandardLibraryFeature

    public static <C> boolean isStandardLibraryFeature(Environment<?,C,?,?,?,?,?,?,?,?,?,?> env,
                                                       C owner,
                                                       Object feature)

  Queries whether the specified feature (operation or attribute), as applied to a particular `owner` classifier, is defined by the standard library or not (in which case it would, presumably, be user-defined).

  Parameters:
    `owner` - a classifier on which a feature is to be accessed
    `feature` - the feature to be accessed
  Returns:
    whether the feature is defined by the standard library
  Since:
    1.3

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.