Class 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. <p>From package UML::Packages.</p>
[XmlNamespace("http://www.eclipse.org/uml2/5.0.0/UML")]
[XmlNamespacePrefix("uml")]
[ModelRepresentationClass("http://www.eclipse.org/uml2/5.0.0/UML#//Stereotype")]
public class Stereotype : Class, IStereotype, IClass, IBehavioredClassifier, IEncapsulatedClassifier, IStructuredClassifier, IClassifier, ITemplateableElement, IType, IPackageableElement, IParameterableElement, IRedefinableElement, INamespace, INamedElement, IElement, IEModelElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Stereotype
- Implements
- Inherited Members
Constructors
Stereotype()
Creates a new instance
public Stereotype()
Properties
Children
Gets the child model elements of this model element
public override IEnumerableExpression<IModelElement> Children { get; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
Icon
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. <p>From package UML::Packages.</p>
[Browsable(false)]
[XmlElementName("icon")]
[XmlAttribute(false)]
[Containment]
public IOrderedSetExpression<IImage> Icon { get; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Methods
AssociationEndOwnership(object, object)
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)
public bool AssociationEndOwnership(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Base_property_multiplicity_multiple_extension(object, object)
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.
public bool Base_property_multiplicity_multiple_extension(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Base_property_multiplicity_single_extension(object, object)
If a Stereotype extends only one metaclass, the multiplicity of the corresponding base-property shall be 1..1.
public bool Base_property_multiplicity_single_extension(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
Base_property_upper_bound(object, object)
The upper bound of base-properties is exactly 1.
public bool Base_property_upper_bound(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
BinaryAssociationsOnly(object, object)
Stereotypes may only participate in binary associations. ownedAttribute.association->forAll(memberEnd->size()=2)
public bool BinaryAssociationsOnly(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
ContainingProfile()
The query containingProfile returns the closest profile directly or indirectly containing this stereotype. result = (self.namespace.oclAsType(Package).containingProfile()) <p>From package UML::Packages.</p>
public IProfile ContainingProfile()
Returns
CreateExtension(IClass, bool)
Creates a(n) (required) extension of the specified metaclass with this stereotype.
public IExtension CreateExtension(IClass metaclass, bool isRequired)
Parameters
metaclass
IClassThe metaclass for the new extension.
isRequired
boolWhether the new extension should be required.
Returns
CreateIcon(string)
Creates an icon with the specified location for this stereotype.
public IImage CreateIcon(string location)
Parameters
location
stringThe location for the new icon.
Returns
CreateIcon(string, string)
Creates an icon with the specified format and content for this stereotype.
public IImage CreateIcon(string format, string content)
Parameters
Returns
Generalize(object, object)
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))
public bool Generalize(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.
Returns
GetAllExtendedMetaclasses()
Retrieves all the metaclasses extended by this stereotype, including the metaclasses extended by its superstereotypes.
public ISetExpression<IClass> GetAllExtendedMetaclasses()
Returns
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetCollectionForFeature(string)
Gets the Model element collection for the given feature
protected override IList GetCollectionForFeature(string feature)
Parameters
feature
stringThe requested feature
Returns
- IList
A non-generic list of elements
GetCompositionName(object)
Gets the property name for the given container
protected override string GetCompositionName(object container)
Parameters
container
objectThe container object
Returns
- string
The name of the respective container reference
GetDefinition()
Retrieves the current definition (Ecore representation) of this stereotype.
public IEClass GetDefinition()
Returns
GetExtendedMetaclasses()
Retrieves the metaclasses extended by this stereotype.
public ISetExpression<IClass> GetExtendedMetaclasses()
Returns
GetKeyword()
Retrieves the localized keyword for this stereotype.
public string GetKeyword()
Returns
GetKeyword(bool)
Retrieves the keyword for this stereotype, localized if indicated.
public string GetKeyword(bool localize)
Parameters
localize
boolWhether to localize the keyword.
Returns
GetModelElementForReference(string, int)
Resolves the given URI to a child model element
protected override IModelElement GetModelElementForReference(string reference, int index)
Parameters
Returns
- IModelElement
The model element or null if it could not be found
GetProfile()
A stereotype must be contained, directly or indirectly, in a profile. result = (self.containingProfile()) <p>From package UML::Packages.</p>
public IProfile GetProfile()
Returns
GetRelativePathForNonIdentifiedChild(IModelElement)
Gets the relative URI fragment for the given child model element
protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)
Parameters
element
IModelElementThe element that should be looked for
Returns
- string
A fragment of the relative URI
Name_not_clash(object, object)
Stereotype names should not clash with keyword names for the extended model element.
public bool Name_not_clash(object diagnostics, object context)
Parameters
diagnostics
objectThe chain of diagnostics to which problems are to be appended.
context
objectThe cache of context-specific information.