## org.eclipse.uml2.uml
Interface Stereotype

All Superinterfaces:
  BehavioredClassifier, Class, Classifier, Element, org.eclipse.emf.ecore.EModelElement, EncapsulatedClassifier, org.eclipse.emf.ecore.EObject, NamedElement, Namespace, org.eclipse.emf.common.notify.Notifier, PackageableElement, ParameterableElement, RedefinableElement, StructuredClassifier, TemplateableElement, Type

    public interface Stereotype

extends Class

A representation of the model object 'Stereotype'. A stereotype defines how an existing metaclass may be extended, and enables the use of platform or domain specific terminology or notation in place of, or in addition to, the ones used for the extended metaclass.

The following features are supported:

- `Icon`

See Also:
  `UMLPackage.getStereotype()`

Method Summary
`Extension` `createExtension(Class metaclass, boolean isRequired)` Creates a(n) (required) extension of the specified metaclass with this stereotype.
`Image` `createIcon()` Creates a new `Image` and appends it to the 'Icon' containment reference list
`Image` `createIcon(java.lang.String location)` Creates an icon with the specified location for this stereotype.
`Image` `createIcon(java.lang.String format, java.lang.String content)` Creates an icon with the specified format and content for this stereotype.
`org.eclipse.emf.common.util.EList<Class>` `getAllExtendedMetaclasses()` Retrieves all the metaclasses extended by this stereotype, including the metaclasses extended by its superstereotypes
`org.eclipse.emf.ecore.EClass` `getDefinition()` Retrieves the current definition (Ecore representation) of this stereotype
`org.eclipse.emf.common.util.EList<Class>` `getExtendedMetaclasses()` Retrieves the metaclasses extended by this stereotype
`org.eclipse.emf.common.util.EList<Image>` `getIcons()` Returns the value of the 'Icon' containment reference list.
`java.lang.String` `getKeyword()` Retrieves the localized keyword for this stereotype
`java.lang.String` `getKeyword(boolean localize)` Retrieves the keyword for this stereotype, localized if indicated.
`Profile` `getProfile()` Retrieves the profile that owns this stereotype
`boolean` `validateGeneralize(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` A Stereotype may only generalize or specialize another Stereotype.
`boolean` `validateNameNotClash(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` Stereotype names should not clash with keyword names for the extended model element.

Methods inherited from interface org.eclipse.uml2.uml.Class

`createNestedClassifier, createOwnedOperation, createOwnedOperation, createOwnedReception, getExtension, getExtension, getExtensions, getNestedClassifier, getNestedClassifier, getNestedClassifiers, getOwnedOperation, getOwnedOperation, getOwnedOperations, getOwnedReception, getOwnedReception, getOwnedReceptions, getSuperClass, getSuperClass, getSuperClasses, isActive, isMetaclass, setIsActive, validatePassiveClass`

Methods inherited from interface org.eclipse.uml2.uml.EncapsulatedClassifier
`createOwnedPort, getOwnedPort, getOwnedPort, getOwnedPorts`

Methods inherited from interface org.eclipse.uml2.uml.StructuredClassifier
`createOwnedAttribute, createOwnedAttribute, createOwnedAttribute, createOwnedConnector, getOwnedAttribute, getOwnedAttribute, getOwnedAttributes, getOwnedConnector, getOwnedConnector, getOwnedConnectors, getPart, getPart, getParts, getRole, getRole, getRoles, validateMultiplicities`

Methods inherited from interface org.eclipse.uml2.uml.Classifier

`allFeatures, allParents, conformsTo, createCollaborationUse, createGeneralization, createOwnedUseCase, createRepresentation, createSubstitution, getAllAttributes, getAllOperations, getAllUsedInterfaces, getAttribute, getAttribute, getAttributes, getCollaborationUse, getCollaborationUse, getCollaborationUses, getFeature, getFeature, getFeatures, getGeneral, getGeneral, getGeneralization, getGeneralization, getGeneralizations, getGenerals, getInheritedMember, getInheritedMember, getInheritedMembers, getOperation, getOperation, getOperations, getOwnedUseCase, getOwnedUseCase, getOwnedUseCases, getPowertypeExtent, getPowertypeExtent, getPowertypeExtents, getRedefinedClassifier, getRedefinedClassifier, getRedefinedClassifiers, getRepresentation, getSubstitution, getSubstitution, getSubstitutions, getUseCase, getUseCase, getUseCases, getUsedInterfaces, hasVisibilityOf, inherit, inheritableMembers, isAbstract, maySpecializeType, parents, setIsAbstract, setRepresentation, validateGeneralizationHierarchies, validateMapsToGeneralizationSet, validateNoCyclesInGeneralization, validateSpecializeType`

Methods inherited from interface org.eclipse.uml2.uml.Namespace

`createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
`getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.Type
`conformsTo, createAssociation, getAssociations, getPackage, setPackage`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
`getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement
`createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature`

Methods inherited from interface org.eclipse.uml2.uml.BehavioredClassifier

`createClassifierBehavior, createInterfaceRealization, createOwnedBehavior, createOwnedTrigger, getAllImplementedInterfaces, getClassifierBehavior, getImplementedInterfaces, getInterfaceRealization, getInterfaceRealization, getInterfaceRealizations, getOwnedBehavior, getOwnedBehavior, getOwnedBehaviors, getOwnedTrigger, getOwnedTrigger, getOwnedTriggers, setClassifierBehavior, validateClassBehavior`

Method Detail

### getIcons

    org.eclipse.emf.common.util.EList<Image> getIcons()

  Returns the value of the 'Icon' containment reference list. The list contents are of type `Image`. Stereotype can change the graphical appearance of the extended model element by using attached icons. When this association is not null, it references the location of the icon content to be displayed within diagrams presenting the extended model elements.

  Returns:
    the value of the 'Icon' containment reference list.
  See Also:
    `UMLPackage.getStereotype_Icon()`

### createIcon

    Image createIcon()

  Creates a new `Image` and appends it to the 'Icon' containment reference list.

  Returns:
    The new `Image`.
  See Also:
    `getIcons()`

### validateNameNotClash

    boolean validateNameNotClash(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)

  Stereotype names should not clash with keyword names for the extended model element. true

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### validateGeneralize

    boolean validateGeneralize(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)

  A Stereotype may only generalize or specialize another Stereotype. generalization.general->forAll(e |e.oclIsKindOf(Stereotype)) and generalization.specific->forAll(e | e.oclIsKindOf(Stereotype))

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### createExtension

    Extension createExtension(Class metaclass,
                              boolean isRequired)

  Creates a(n) (required) extension of the specified metaclass with this stereotype.

  Parameters:
    `metaclass` - The metaclass for the new extension.
    `isRequired` - Whether the new extension should be required.

### getProfile

    Profile getProfile()

  Retrieves the profile that owns this stereotype.

### getKeyword

    java.lang.String getKeyword()

  Retrieves the localized keyword for this stereotype.

### getKeyword

    java.lang.String getKeyword(boolean localize)

  Retrieves the keyword for this stereotype, localized if indicated.

  Parameters:
    `localize` - Whether to localize the keyword.

### getExtendedMetaclasses

    org.eclipse.emf.common.util.EList<Class> getExtendedMetaclasses()

  Retrieves the metaclasses extended by this stereotype.

### getAllExtendedMetaclasses

    org.eclipse.emf.common.util.EList<Class> getAllExtendedMetaclasses()

  Retrieves all the metaclasses extended by this stereotype, including the metaclasses extended by its superstereotypes.

### getDefinition

    org.eclipse.emf.ecore.EClass getDefinition()

  Retrieves the current definition (Ecore representation) of this stereotype.

### createIcon

    Image createIcon(java.lang.String location)

  Creates an icon with the specified location for this stereotype.

  Parameters:
    `location` - The location for the new icon.

### createIcon

    Image createIcon(java.lang.String format,
                     java.lang.String content)

  Creates an icon with the specified format and content for this stereotype.

  Parameters:
    `format` - The format for the new icon.
    `content` - The content for the new icon.

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