## org.eclipse.ocl.ecore.internal
Class UMLReflectionImpl

    java.lang.Object
      org.eclipse.ocl.ecore.internal.UMLReflectionImpl

All Implemented Interfaces:
  UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>

    public class UMLReflectionImpl

extends Object
implements UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>

Implementation of the UML reflection service for the Ecore environment.

Field Summary
`static UMLReflectionImpl` `INSTANCE` Shared instance of the stateless reflection service.

Fields inherited from interface org.eclipse.ocl.utilities.UMLReflection
`BODY, DEFINITION, DERIVATION, INITIAL, INVARIANT, OCL_HELPER, POSTCONDITION, PRECONDITION, RELATED_TYPE, SAME_TYPE, STRICT_SUBTYPE, STRICT_SUPERTYPE, SUBTYPE, SUPERTYPE, UNRELATED_TYPE`

Constructor Summary
`protected` `UMLReflectionImpl()` Initializes me.

Method Summary
`EClassifier` `asOCLType(EClassifier modelType)` Obtains the OCL type corresponding to the specified type from the environment's type system.
`CallOperationAction` `createCallOperationAction(EOperation operation)` Creates a `CallOperationAction` referencing the specified operation.
`Constraint` `createConstraint()` Creates a `Constraint`.
`ExpressionInOCL<EClassifier,EParameter>` `createExpressionInOCL()` Creates an `ExpressionInOCL`.
`EOperation` `createOperation(String name, EClassifier resultType, List<String> paramNames, List<EClassifier> paramTypes)` Creates a new `Operation`.
`EStructuralFeature` `createProperty(String name, EClassifier resultType)` Creates a new `Property`.
`SendSignalAction` `createSendSignalAction(EClassifier signal)` Creates a `SendSignalAction` referencing the specified signal.
`Collection<? extends EClassifier>` `getAllSupertypes(EClassifier classifier)` Obtains all of the classifiers that generalize the specified classifier.
`EClass` `getAssociationClass(EStructuralFeature reference)` Obtains the association class that the specified reference represents, as an `EClass`, if any.
`List<EStructuralFeature>` `getAttributes(EClassifier classifier)` Obtains all of the attributes defined by and inherited by the specified classifier.
`List<EClassifier>` `getClassifiers(EPackage pkg)` Obtains the classifiers contained directly within the specified package.
`EClassifier` `getCommonSuperType(EClassifier type1, EClassifier type2)` Get the common supertype of two types.
`List<EObject>` `getConstrainedElements(Constraint constraint)` Obtains the list of element constraint by a constraint, as a list of `EObject`s.
`Constraint` `getConstraint(ExpressionInOCL<EClassifier,EParameter> specification)` Obtains the constraint owning the given specification, if any.
`String` `getConstraintName(Constraint constraint)` Obtains the name of a constraint.
`String` `getDescription(Object namedElement)` Default implementation just gets the name of the named element's `eClass` or, if it is an `ETypedElement`, the name of its type.
`EClassifier` `getEnumeration(EEnumLiteral enumerationLiteral)` Obtains the enumeration declaring the specified literal.
`EEnumLiteral` `getEnumerationLiteral(EClassifier enumerationType, String literalName)` Obtains the named literal of an enumeration.
`List<EEnumLiteral>` `getEnumerationLiterals(EClassifier enumerationType)` Obtains the literals declared by the specified enumeration type.
`List<EStructuralFeature>` `getMemberEnds(EClassifier associationClass)` Obtains the ends of the specified association class as a list of `EReference`s.
`String` `getName(Object namedElement)` Obtains the name of an element, if it is a named element.
`List<EPackage>` `getNestedPackages(EPackage pkg)` Obtains the packages nested within the specified nesting package, if any.
`EPackage` `getNestingPackage(EPackage pkg)` Obtains the parent package (or nearest parent package), if any, of the specified package.
`EClassifier` `getOCLType(Object metaElement)` Obtains the type of a meta-element (classifier, operation, property, parameter, etc.).
`EOperation` `getOperation(CallOperationAction callOperationAction)` Obtains the called operation referenced by the specified call action.
`List<EOperation>` `getOperations(EClassifier classifier)` Obtains all of the operations defined by and inherited by the specified classifier.
`EClassifier` `getOwningClassifier(Object feature)` Obtains the classifier that declares the specified feature.
`EPackage` `getPackage(EClassifier classifier)` Obtains the package containing (or nearest package of) the specified classifier.
`List<EParameter>` `getParameters(EOperation operation)` Obtains the formal parameters (excluding return parameters) of an operation.
`String` `getQualifiedName(Object namedElement)` Obtains the qualified name of an element ("::"-separated), if it is a named element.
`List<EStructuralFeature>` `getQualifiers(EStructuralFeature property)` Gets the qualifiers of an association end.
`int` `getRelationship(EClassifier type1, EClassifier type2)` Computes the relationship between two types.
`EClass` `getSignal(SendSignalAction sendSignalAction)` Obtains the sent signal referenced by the specified send action.
`List<EClassifier>` `getSignals(EClassifier owner)` Retrieves a list of all signal receptions defined by the specified `owner` classifier.
`ExpressionInOCL<EClassifier,EParameter>` `getSpecification(Constraint constraint)` Obtains the specification of a constraint, if it is an `ExpressionInOCL`.
`String` `getStereotype(Constraint constraint)` Obtains the stereotype (one of the constants defined by this interface) that identifies the kind of the specified constraint.
`Object` `getStereotypeApplication(Object baseElement, EClassifier stereotype)` Obtains the application (stereotype instance) of the specified stereotype applied to the given base element, if the stereotype is indeed applied.
`static boolean` `isAncestor(EObject ancestor, EObject descendent)` Queries whether a prospective `ancestor` really is a container (recursively) of the specified `descendent`.
`boolean` `isAssociationClass(EClassifier eclass)` Determines whether the specified `eclass` is an association class.
`boolean` `isClass(Object metaElement)` Queries whether the specified model element is a class.
`boolean` `isClassifier(Object metaElement)` Queries whether the specified model element is a classifier.
`boolean` `isComparable(EClassifier type)` Queries whether the specified type is a comparable (fully ordered) data type.
`boolean` `isDataType(Object metaElement)` Queries whether the specified model element is a data type.
`boolean` `isEnumeration(EClassifier type)` Queries whether the specified classifier is an enumeration.
`boolean` `isMany(Object metaElement)` Queries whether the specified meta-element (already known to be a property, parameter, or operation) has multiplicity many.
`boolean` `isOperation(Object metaElement)` Queries whether the specified model element is an operation.
`boolean` `isProperty(Object metaElement)` Queries whether the specified model element is a property.
`boolean` `isQuery(EOperation operation)` Determines whether the specified `operation` is a query operation.
`boolean` `isStatic(Object feature)` Queries whether a property or operation is static (applies to a classifier rather than to its instances).
`boolean` `isStereotype(EClassifier type)` Queries whether the specified model element is a stereotype.
`void` `setConstraintName(Constraint constraint, String name)` Sets the name of a constraint.
`void` `setName(TypedElement<EClassifier> element, String name)` Sets the name of the specified typed element.
`void` `setSpecification(Constraint constraint, ExpressionInOCL<EClassifier,EParameter> specification)` Sets the specification of a constraint.
`void` `setStereotype(Constraint constraint, String stereotype)` Sets the stereotype (one of the constants defined by this interface) that identifies the kind of the specified constraint.
`void` `setType(TypedElement<EClassifier> element, EClassifier type)` Sets the type of the specified typed element.

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

Field Detail

### INSTANCE

    public static final UMLReflectionImpl INSTANCE

  Shared instance of the stateless reflection service.

Constructor Detail

### UMLReflectionImpl

    protected UMLReflectionImpl()

  Initializes me.

Method Detail

### getDescription

    public String getDescription(Object namedElement)

  Default implementation just gets the name of the named element's `eClass` or, if it is an `ETypedElement`, the name of its type.

  Specified by:
    `getDescription` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `namedElement` - a named element
  Returns:
    the named element's description

### getName

    public String getName(Object namedElement)

  Description copied from interface: `UMLReflection`
  Obtains the name of an element, if it is a named element.

  Specified by:
    `getName` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `namedElement` - a named element
  Returns:
    the named element's name, or `null` if it is not a named element

### getQualifiedName

    public String getQualifiedName(Object namedElement)

  Description copied from interface: `UMLReflection`
  Obtains the qualified name of an element ("::"-separated), if it is a named element.

  Specified by:
    `getQualifiedName` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `namedElement` - a named element
  Returns:
    the named element's qualified name, or `null` if it is not a named element

### getOCLType

    public EClassifier getOCLType(Object metaElement)

  Description copied from interface: `UMLReflection`
  Obtains the type of a meta-element (classifier, operation, property, parameter, etc.). If there is a predefined type provided by OCL (such as Boolean or Set), then it should be returned. For elements that have multiplicity (properties, parameters, operations), the type that is returned should be an OCL collection type if the element has many multiplicity.

  Specified by:
    `getOCLType` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `metaElement` - an element of the environment's metamodel
  Returns:
    its OCL type
  See Also:
    `UMLReflection.isMany(Object)`

### getAllSupertypes

    public Collection<? extends EClassifier> getAllSupertypes(EClassifier classifier)

  Description copied from interface: `UMLReflection`
  Obtains all of the classifiers that generalize the specified classifier.

  Specified by:
    `getAllSupertypes` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `classifier` - a classifier
  Returns:
    all of its general classifiers, or an empty collection if none

### isMany

    public boolean isMany(Object metaElement)

  Description copied from interface: `UMLReflection`
  Queries whether the specified meta-element (already known to be a property, parameter, or operation) has multiplicity many.

  Specified by:
    `isMany` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `metaElement` - a property, parameter, or operation
  Returns:
    whether it has many multiplicity

### asOCLType

    public EClassifier asOCLType(EClassifier modelType)

  Description copied from interface: `UMLReflection`
  Obtains the OCL type corresponding to the specified type from the environment's type system. If there is a predefined type provided by OCL (such as Boolean), then it should be returned. Otherwise, the environment's own type (the original `modelType`) is appropriate.

  Specified by:
    `asOCLType` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `modelType` - a type in the environment
  Returns:
    the corresponding OCL pre-defined type, or just `modelType` if none

### getNestingPackage

    public EPackage getNestingPackage(EPackage pkg)

  Description copied from interface: `UMLReflection`
  Obtains the parent package (or nearest parent package), if any, of the specified package.

  Specified by:
    `getNestingPackage` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `pkg` - a package
  Returns:
    the nearest nesting package, or `null` if the given package has no nesting package
  See Also:
    `UMLReflection.getNestedPackages(PK)`

### getNestedPackages

    public List<EPackage> getNestedPackages(EPackage pkg)

  Description copied from interface: `UMLReflection`
  Obtains the packages nested within the specified nesting package, if any.

  Specified by:
    `getNestedPackages` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `pkg` - a package
  Returns:
    the nested packages, or an empty list if none
  See Also:
    `UMLReflection.getNestingPackage(PK)`

### getPackage

    public EPackage getPackage(EClassifier classifier)

  Description copied from interface: `UMLReflection`
  Obtains the package containing (or nearest package of) the specified classifier.

  Specified by:
    `getPackage` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `classifier` - a classifier in the model
  Returns:
    the nearest containing package, or `null` if there is none

### getClassifiers

    public List<EClassifier> getClassifiers(EPackage pkg)

  Description copied from interface: `UMLReflection`
  Obtains the classifiers contained directly within the specified package.

  Specified by:
    `getClassifiers` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `pkg` - a package in the model
  Returns:
    the classifiers in the package, or an empty list if none

### getOwningClassifier

    public EClassifier getOwningClassifier(Object feature)

  Description copied from interface: `UMLReflection`
  Obtains the classifier that declares the specified feature.

  Specified by:
    `getOwningClassifier` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `feature` - an operation or property
  Returns:
    the classifier that defines the specified feature (should never be `null`)

### getParameters

    public List<EParameter> getParameters(EOperation operation)

  Description copied from interface: `UMLReflection`
  Obtains the formal parameters (excluding return parameters) of an operation.

  Specified by:
    `getParameters` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `operation` - an operation in the model
  Returns:
    the operation's formal parameters, or an empty list if none

### createOperation

    public EOperation createOperation(String name,
                                      EClassifier resultType,
                                      List<String> paramNames,
                                      List<EClassifier> paramTypes)

  Description copied from interface: `UMLReflection`
  Creates a new `Operation`. Because OCL can only define query operations, a result type must be provided. This method is used in parsing the definition of additional operations, and in the construction of the OCL standard library types.

  Note that the new operation must be a query operation, as OCL can only define queries.

  Specified by:
    `createOperation` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `name` - the name of the new operation (must not be `null`)
    `resultType` - the result type of the operation (not `null`)
    `paramNames` - the names of the formal parameters of the operaiton (may be an empty list if no parameters)
    `paramTypes` - the parameter types, corresponding one-for-one with the parameter names
  Returns:
    the new operation
  See Also:
    `UMLReflection.isQuery(Object)`

### getOperations

    public List<EOperation> getOperations(EClassifier classifier)

  Description copied from interface: `UMLReflection`
  Obtains all of the operations defined by and inherited by the specified classifier. This method will not be called for the types pre-defined by OCL, as their operations are known by the parser.

  Specified by:
    `getOperations` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `classifier` - a classifier in the model
  Returns:
    the operations applicable to the specified classifier, or an empty list if none

### createProperty

    public EStructuralFeature createProperty(String name,
                                             EClassifier resultType)

  Description copied from interface: `UMLReflection`
  Creates a new `Property`. A type must be provided. This method is used in parsing the definition of additional properties, and in the construction of the OCL standard library types.

  Specified by:
    `createProperty` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `name` - the name of the new property (must not be `null`)
    `resultType` - the type of the property (not `null`)
  Returns:
    the new property

### getAttributes

    public List<EStructuralFeature> getAttributes(EClassifier classifier)

  Description copied from interface: `UMLReflection`
  Obtains all of the attributes defined by and inherited by the specified classifier. This method will not be called for the types pre-defined by OCL (such as tuple and message types), as their attributes are known by the parser.

  Specified by:
    `getAttributes` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `classifier` - a classifier in the model
  Returns:
    the attributes applicable to the specified classifier, or an empty list if none

### getSignals

    public List<EClassifier> getSignals(EClassifier owner)

  Description copied from interface: `UMLReflection`
  Retrieves a list of all signal receptions defined by the specified `owner` classifier. This must include also signals defined by supertypes of the owner. This method is used for content-assist.

  Specified by:
    `getSignals` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `owner` - the owner type of the signal receptions
  Returns:
    the available signals (as `EClass`es), or an empty list if none

### isQuery

    public boolean isQuery(EOperation operation)

  Determines whether the specified `operation` is a query operation. By default, all operations are assumed to be queries.

  Specified by:
    `isQuery` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `operation` - an operation
  Returns:
    `true`, by default

### isStatic

    public boolean isStatic(Object feature)

  Description copied from interface: `UMLReflection`
  Queries whether a property or operation is static (applies to a classifier rather than to its instances).

  Specified by:
    `isStatic` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `feature` - an operation or a property
  Returns:
    whether it is static

### isAssociationClass

    public boolean isAssociationClass(EClassifier eclass)

  Determines whether the specified `eclass` is an association class. By default, it is assumed that nothing is an association class because Ecore does not directly support this concept.

  Specified by:
    `isAssociationClass` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `eclass` - an Ecore class
  Returns:
    `false`, by default

### getAssociationClass

    public EClass getAssociationClass(EStructuralFeature reference)

  Obtains the association class that the specified reference represents, as an `EClass`, if any. By default, it is assumed that nothing is an association class because Ecore does not directly support this concept.

  Specified by:
    `getAssociationClass` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `reference` - a reference
  Returns:
    `null`, by default

### getMemberEnds

    public List<EStructuralFeature> getMemberEnds(EClassifier associationClass)

  Obtains the ends of the specified association class as a list of `EReference`s. By default, it is assumed that nothing is an association class because Ecore does not directly support this concept.

  Specified by:
    `getMemberEnds` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `associationClass` - an EClass representing an association class
  Returns:
    an empty list, by default
  See Also:
    `UMLReflection.isAssociationClass(C)`

### isOperation

    public boolean isOperation(Object metaElement)

  Description copied from interface: `UMLReflection`
  Queries whether the specified model element is an operation.

  Specified by:
    `isOperation` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `metaElement` - a model element
  Returns:
    whether it is an operation

### isProperty

    public boolean isProperty(Object metaElement)

  Description copied from interface: `UMLReflection`
  Queries whether the specified model element is a property.

  Specified by:
    `isProperty` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `metaElement` - a model element
  Returns:
    whether it is a property

### isClassifier

    public boolean isClassifier(Object metaElement)

  Description copied from interface: `UMLReflection`
  Queries whether the specified model element is a classifier.

  Specified by:
    `isClassifier` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `metaElement` - a model element
  Returns:
    whether it is a classifier

### isClass

    public boolean isClass(Object metaElement)

  Description copied from interface: `UMLReflection`
  Queries whether the specified model element is a class.

  Specified by:
    `isClass` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `metaElement` - a model element
  Returns:
    whether it is a class

### isDataType

    public boolean isDataType(Object metaElement)

  Description copied from interface: `UMLReflection`
  Queries whether the specified model element is a data type.

  Specified by:
    `isDataType` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `metaElement` - a model element
  Returns:
    whether it is a data type

### isEnumeration

    public boolean isEnumeration(EClassifier type)

  Description copied from interface: `UMLReflection`
  Queries whether the specified classifier is an enumeration.

  Specified by:
    `isEnumeration` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `type` - a type in the model
  Returns:
    whether it is an enumeration

### getEnumeration

    public EClassifier getEnumeration(EEnumLiteral enumerationLiteral)

  Description copied from interface: `UMLReflection`
  Obtains the enumeration declaring the specified literal.

  Specified by:
    `getEnumeration` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `enumerationLiteral` - an enumeration literal
  Returns:
    the literal's declaring enumeration (should not be `null`)

### getEnumerationLiterals

    public List<EEnumLiteral> getEnumerationLiterals(EClassifier enumerationType)

  Description copied from interface: `UMLReflection`
  Obtains the literals declared by the specified enumeration type. This type was already determined to be an `enumeration`.

  Specified by:
    `getEnumerationLiterals` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `enumerationType` - an enumeration
  Returns:
    its literals, or an empty set if it has none

### getEnumerationLiteral

    public EEnumLiteral getEnumerationLiteral(EClassifier enumerationType,
                                              String literalName)

  Description copied from interface: `UMLReflection`
  Obtains the named literal of an enumeration. This type was already determined to be an `enumeration`.

  Specified by:
    `getEnumerationLiteral` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `enumerationType` - an enumeration
    `literalName` - the name of a literal
  Returns:
    the matching enumeration literal, or `null` if the specified name does not match an existing literal

### isStereotype

    public boolean isStereotype(EClassifier type)

  Description copied from interface: `UMLReflection`
  Queries whether the specified model element is a stereotype. Note that a metamodel is not required to support stereotypes.

  Specified by:
    `isStereotype` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `type` - a type in the model
  Returns:
    whether it is a stereotype

### getStereotypeApplication

    public Object getStereotypeApplication(Object baseElement,
                                           EClassifier stereotype)

  Description copied from interface: `UMLReflection`
  Obtains the application (stereotype instance) of the specified stereotype applied to the given base element, if the stereotype is indeed applied.

  Specified by:
    `getStereotypeApplication` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `baseElement` - a model element
    `stereotype` - a stereotype applied to the element
  Returns:
    the stereotype instance if the stereotype is applied to it, or `null` if the stereotype is not applied

### isComparable

    public boolean isComparable(EClassifier type)

  Description copied from interface: `UMLReflection`
  Queries whether the specified type is a comparable (fully ordered) data type. Instances of a comparable type can be compared using the <, <=, >, and >= operations.

  Specified by:
    `isComparable` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `type` - a type in the model
  Returns:
    whether it is comparable

### createCallOperationAction

    public CallOperationAction createCallOperationAction(EOperation operation)

  Description copied from interface: `UMLReflection`
  Creates a `CallOperationAction` referencing the specified operation.

  Specified by:
    `createCallOperationAction` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `operation` - the operation that is called
  Returns:
    the `CallOperationAction`

### getOperation

    public EOperation getOperation(CallOperationAction callOperationAction)

  Description copied from interface: `UMLReflection`
  Obtains the called operation referenced by the specified call action.

  Specified by:
    `getOperation` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `callOperationAction` - an operation-call action
  Returns:
    the called operation (should not be `null`)

### createSendSignalAction

    public SendSignalAction createSendSignalAction(EClassifier signal)

  Description copied from interface: `UMLReflection`
  Creates a `SendSignalAction` referencing the specified signal.

  Specified by:
    `createSendSignalAction` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `signal` - the signal that is send
  Returns:
    the `SendSignalAction`

### getSignal

    public EClass getSignal(SendSignalAction sendSignalAction)

  Description copied from interface: `UMLReflection`
  Obtains the sent signal referenced by the specified send action.

  Specified by:
    `getSignal` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `sendSignalAction` - a signal-send action
  Returns:
    the sent signal (should not be `null`)

### createConstraint

    public Constraint createConstraint()

  Description copied from interface: `UMLReflection`
  Creates a `Constraint`.

  Specified by:
    `createConstraint` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Returns:
    the new `Constraint`

### getStereotype

    public String getStereotype(Constraint constraint)

  Description copied from interface: `UMLReflection`
  Obtains the stereotype (one of the constants defined by this interface) that identifies the kind of the specified constraint.

  Specified by:
    `getStereotype` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `constraint` - a constraint
  Returns:
    its stereotype (should not be `null`)

### setStereotype

    public void setStereotype(Constraint constraint,
                              String stereotype)

  Description copied from interface: `UMLReflection`
  Sets the stereotype (one of the constants defined by this interface) that identifies the kind of the specified constraint.

  Specified by:
    `setStereotype` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `constraint` - a constraint
    `stereotype` - its stereotype (must not be `null`)

### getConstraintName

    public String getConstraintName(Constraint constraint)

  Description copied from interface: `UMLReflection`
  Obtains the name of a constraint.

  Specified by:
    `getConstraintName` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `constraint` - a constraint
  Returns:
    the constraint name

### setConstraintName

    public void setConstraintName(Constraint constraint,
                                  String name)

  Description copied from interface: `UMLReflection`
  Sets the name of a constraint.

  Specified by:
    `setConstraintName` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `constraint` - a constraint
    `name` - the constraint name

### createExpressionInOCL

    public ExpressionInOCL<EClassifier,EParameter> createExpressionInOCL()

  Description copied from interface: `UMLReflection`
  Creates an `ExpressionInOCL`.

  Specified by:
    `createExpressionInOCL` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Returns:
    the new `ExpressionInOCL`

### getSpecification

    public ExpressionInOCL<EClassifier,EParameter> getSpecification(Constraint constraint)

  Description copied from interface: `UMLReflection`
  Obtains the specification of a constraint, if it is an `ExpressionInOCL`.

  Specified by:
    `getSpecification` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `constraint` - a constraint
  Returns:
    its specification as an `ExpressionInOCL`, or `null` if it has none or it is not an `ExpressionInOCL`

### setSpecification

    public void setSpecification(Constraint constraint,
                                 ExpressionInOCL<EClassifier,EParameter> specification)

  Description copied from interface: `UMLReflection`
  Sets the specification of a constraint.

  Specified by:
    `setSpecification` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `constraint` - a constraint
    `specification` - its specification

### getConstraint

    public Constraint getConstraint(ExpressionInOCL<EClassifier,EParameter> specification)

  Description copied from interface: `UMLReflection`
  Obtains the constraint owning the given specification, if any.

  Specified by:
    `getConstraint` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `specification` - a constraint specification
  Returns:
    the constraint that it specifies, or `null` if none

### getConstrainedElements

    public List<EObject> getConstrainedElements(Constraint constraint)

  Description copied from interface: `UMLReflection`
  Obtains the list of element constraint by a constraint, as a list of `EObject`s. This list is modifiable.

  Specified by:
    `getConstrainedElements` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `constraint` - a constraint
  Returns:
    its constrained elements

### getQualifiers

    public List<EStructuralFeature> getQualifiers(EStructuralFeature property)

  Gets the qualifiers of an association end. By default, it is assumed that properties never have qualifiers because Ecore does not directly support this concept.

  Specified by:
    `getQualifiers` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `property` - a property of the model class
  Returns:
    an empty list, by default

### getCommonSuperType

    public EClassifier getCommonSuperType(EClassifier type1,
                                          EClassifier type2)

  Get the common supertype of two types.

  Specified by:
    `getCommonSuperType` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `type1` -
    `type2` -
  Returns:
    the common supertype

### getRelationship

    public int getRelationship(EClassifier type1,
                               EClassifier type2)

  Computes the relationship between two types.

  Specified by:
    `getRelationship` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `type1` - a type
    `type2` - another type
  Returns:
    either `UMLReflection.UNRELATED_TYPE`, `UMLReflection.STRICT_SUBTYPE`, `UMLReflection.STRICT_SUPERTYPE`, or `UMLReflection.SAME_TYPE` according to the relationship between the types

### isAncestor

    public static boolean isAncestor(EObject ancestor,
                                     EObject descendent)

  Queries whether a prospective `ancestor` really is a container (recursively) of the specified `descendent`. This utility is like the similar `EcoreUtil` operation, except that it does not require the arguments to be `InternalEObject`s.

  Parameters:
    `ancestor` - a prospective ancestor element
    `descendant` - a prospective descendent element
  Returns:
    `true` if the ancestor contains (recursively) the descendent

### setName

    public void setName(TypedElement<EClassifier> element,
                        String name)

  Description copied from interface: `UMLReflection`
  Sets the name of the specified typed element.

  Specified by:
    `setName` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `element` - a typed element
    `name` - the type element's name
  See Also:
    `TypedElement.getName()`

### setType

    public void setType(TypedElement<EClassifier> element,
                        EClassifier type)

  Description copied from interface: `UMLReflection`
  Sets the type of the specified typed element.

  Specified by:
    `setType` in interface `UMLReflection<EPackage,EClassifier,EOperation,EStructuralFeature,EEnumLiteral,EParameter,EObject,CallOperationAction,SendSignalAction,Constraint>`
  Parameters:
    `element` - a typed element
    `type` - the type element's type
  See Also:
    `TypedElement.getType()`

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