Table of Contents

Class Stereotype

Namespace
NMF.Interop.Uml
Assembly
NMF.UMLInterop.dll

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

IEnumerableExpression<IModelElement>

ClassInstance

Gets the Class model for this type

public static IClass ClassInstance { get; }

Property Value

IClass

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

IOrderedSetExpression<IImage>

ReferencedElements

Gets the referenced model elements of this model element

public override IEnumerableExpression<IModelElement> ReferencedElements { get; }

Property Value

IEnumerableExpression<IModelElement>

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 object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

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 object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

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 object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

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 object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

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 object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

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

IProfile

CreateExtension(IClass, bool)

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

public IExtension CreateExtension(IClass metaclass, bool isRequired)

Parameters

metaclass IClass

The metaclass for the new extension.

isRequired bool

Whether the new extension should be required.

Returns

IExtension

CreateIcon(string)

Creates an icon with the specified location for this stereotype.

public IImage CreateIcon(string location)

Parameters

location string

The location for the new icon.

Returns

IImage

CreateIcon(string, string)

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

public IImage CreateIcon(string format, string content)

Parameters

format string

The format for the new icon.

content string

The content for the new icon.

Returns

IImage

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 object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool

GetAllExtendedMetaclasses()

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

public ISetExpression<IClass> GetAllExtendedMetaclasses()

Returns

ISetExpression<IClass>

GetClass()

Gets the Class for this model element

public override IClass GetClass()

Returns

IClass

GetCollectionForFeature(string)

Gets the Model element collection for the given feature

protected override IList GetCollectionForFeature(string feature)

Parameters

feature string

The 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 object

The 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

IEClass

GetExtendedMetaclasses()

Retrieves the metaclasses extended by this stereotype.

public ISetExpression<IClass> GetExtendedMetaclasses()

Returns

ISetExpression<IClass>

GetKeyword()

Retrieves the localized keyword for this stereotype.

public string GetKeyword()

Returns

string

GetKeyword(bool)

Retrieves the keyword for this stereotype, localized if indicated.

public string GetKeyword(bool localize)

Parameters

localize bool

Whether to localize the keyword.

Returns

string

GetModelElementForReference(string, int)

Resolves the given URI to a child model element

protected override IModelElement GetModelElementForReference(string reference, int index)

Parameters

reference string

The requested reference name

index int

The index of this reference

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

IProfile

GetRelativePathForNonIdentifiedChild(IModelElement)

Gets the relative URI fragment for the given child model element

protected override string GetRelativePathForNonIdentifiedChild(IModelElement element)

Parameters

element IModelElement

The 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 object

The chain of diagnostics to which problems are to be appended.

context object

The cache of context-specific information.

Returns

bool