org.eclipse.uml2.uml
Interface Stereotype

All Superinterfaces:
AttributeOwner, BehavioredClassifier, Class, Classifier, Element, org.eclipse.emf.ecore.EModelElement, EncapsulatedClassifier, org.eclipse.emf.ecore.EObject, NamedElement, Namespace, org.eclipse.emf.common.notify.Notifier, OperationOwner, 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.

From package UML::Packages.

The following features are supported:

See Also:
UMLPackage.getStereotype()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 Profile containingProfile()
          The query containingProfile returns the closest profile directly or indirectly containing this stereotype.
 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()
          Returns the value of the 'Profile' reference
 boolean validateAssociationEndOwnership(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Where a stereotype‚Äôs property is an association end for an association other than a kind of extension, and the other end is not a stereotype, the other end must be owned by the association itself.
 boolean validateBasePropertyMultiplicityMultipleExtension(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If a Stereotype extends more than one metaclass, the multiplicity of the corresponding base-properties shall be [0..1].
 boolean validateBasePropertyMultiplicitySingleExtension(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If a Stereotype extends only one metaclass, the multiplicity of the corresponding base-property shall be 1..1.
 boolean validateBasePropertyUpperBound(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The upper bound of base-properties is exactly 1.
 boolean validateBinaryAssociationsOnly(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          Stereotypes may only participate in binary associations.
 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, getOwnedPort, getOwnedPorts
 
Methods inherited from interface org.eclipse.uml2.uml.StructuredClassifier
allRoles, createOwnedAttribute, createOwnedAttribute, createOwnedAttribute, createOwnedConnector, getOwnedAttribute, getOwnedAttribute, getOwnedAttributes, getOwnedConnector, getOwnedConnector, getOwnedConnectors, getPart, getPart, getParts, getRole, getRole, getRoles
 
Methods inherited from interface org.eclipse.uml2.uml.Classifier
allAttributes, allFeatures, allParents, allRealizedInterfaces, allSlottableFeatures, allUsedInterfaces, createCollaborationUse, createGeneralization, createOwnedUseCase, createRepresentation, createSubstitution, directlyRealizedInterfaces, directlyUsedInterfaces, 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, isFinalSpecialization, isSubstitutableFor, maySpecializeType, parents, setIsAbstract, setIsFinalSpecialization, setRepresentation, validateMapsToGeneralizationSet, validateNoCyclesInGeneralization, validateNonFinalParents, 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, validateCannotImportOwnedMembers, validateCannotImportSelf, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateNonLeafRedefinition, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.Type
conformsTo, createAssociation, getAssociations, getPackage, setPackage
 
Methods inherited from interface org.eclipse.uml2.uml.PackageableElement
validateNamespaceNeedsVisibility
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
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, getAllImplementedInterfaces, getClassifierBehavior, getImplementedInterfaces, getInterfaceRealization, getInterfaceRealization, getInterfaceRealizations, getOwnedBehavior, getOwnedBehavior, getOwnedBehaviors, 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.

This feature subsets the following features:

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.

From package UML::Packages.

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.

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

validateAssociationEndOwnership

boolean validateAssociationEndOwnership(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                        java.util.Map<java.lang.Object,java.lang.Object> context)
Where a stereotype’s property is an association end for an association other than a kind of extension, and the other end is not a stereotype, the other end must be owned by the association itself. ownedAttribute ->select(association->notEmpty() and not association.oclIsKindOf(Extension) and not type.oclIsKindOf(Stereotype)) ->forAll(opposite.owner = association)

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

validateBasePropertyUpperBound

boolean validateBasePropertyUpperBound(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                       java.util.Map<java.lang.Object,java.lang.Object> context)
The upper bound of base-properties is exactly 1.

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

validateBasePropertyMultiplicitySingleExtension

boolean validateBasePropertyMultiplicitySingleExtension(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                        java.util.Map<java.lang.Object,java.lang.Object> context)
If a Stereotype extends only one metaclass, the multiplicity of the corresponding base-property shall be 1..1.

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

validateBasePropertyMultiplicityMultipleExtension

boolean validateBasePropertyMultiplicityMultipleExtension(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                          java.util.Map<java.lang.Object,java.lang.Object> context)
If a Stereotype extends more than one metaclass, the multiplicity of the corresponding base-properties shall be [0..1]. At any point in time, only one of these base-properties can contain a metaclass instance during runtime.

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. allParents()->forAll(oclIsKindOf(Stereotype)) and Classifier.allInstances()->forAll(c | c.allParents()->exists(oclIsKindOf(Stereotype)) implies c.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()
Returns the value of the 'Profile' reference. The profile that directly or indirectly contains this stereotype.

From package UML::Packages.

Returns:
the value of the 'Profile' reference.
See Also:
UMLPackage.getStereotype_Profile()

validateBinaryAssociationsOnly

boolean validateBinaryAssociationsOnly(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                       java.util.Map<java.lang.Object,java.lang.Object> context)
Stereotypes may only participate in binary associations. ownedAttribute.association->forAll(memberEnd->size()=2)

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

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.

containingProfile

Profile containingProfile()
The query containingProfile returns the closest profile directly or indirectly containing this stereotype. result = (self.namespace.oclAsType(Package).containingProfile())

From package UML::Packages.


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, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.