16.5. Stereotype

Stereotypes are the main extension mechanism of UML, providing a way to derive specializations of the standard metaclasses. Stereotype is a sub-class of GeneralizableElement in the UML metamodel. Stereotypes are supplemented by constraints and tagged values.

New stereotypes are added from the property tab of almost any artifact. Properties of existing stereotypes can be reached by selecting the property tab for any artifact with that stereotype and using the navstereo button ( ) within the property tab.

16.5.1. Stereotype Details Tabs

The details tabs that are active for stereotypes are as follows.

ToDoItem

Standard tab.

Properties

See Section 16.5.2, “Stereotype Property Toolbar” and Section 16.5.3, “Property Fields For Stereotype” below.

Documentation

Standard tab. See Section 13.4, “Documentation Tab”.

Source

Standard tab. This contains the representation of the stereotype on diagrams (its name between ?? and ??).

[Warning]Warning

You can edit this entry, but it has no effect and when you return to the entry it will be restored to its original value.

Tagged Values

Standard tab. In the UML metamodel, Stereotype has the following standard tagged values defined.

  • derived (from the superclass, ModelElement). Values true, meaning the class is redundant???it can be formally derived from other elements, or false meaning it cannot.

    [Note]Note

    This indicates any element with this stereotype has the derived tag set accordingly.

[Caution]Caution

Tagged values for a stereotype are rather different to those for elements in the UML core architecture, in that they apply to all artifacts to which the stereotype is applied, not just the stereotype itself.

16.5.2. Stereotype Property Toolbar

Go up

Navigate up through the package structure of the model.

Add stereotype

This creates a new stereotype (see Section 16.5, “Stereotype”) within the model (which appears on no diagram), navigating immediately to the properties tab for that stereotype.

Delete

This deletes the stereotype from the model.

16.5.3. Property Fields For Stereotype

Name

Text box. The name of the stereotype. There is no convention for naming stereotypes, beyond starting them with a lower case letter. Even the standard UML stereotypes vary between all lower case (e.g. metamodel), bumpy caps (e.g. systemModel) and space separated (e.g. object model).

[Note]Note

ArgoUML does not enforce any naming convention for stereotypes

Base Class

Drop down selector. Any stereotype must be derived from one of the metaclasses in the UML metamodel Abstraction, Actor, Association, AssociationEnd, Attribute, BehavioralFeature, CallEvent, Class, Classifier, Collaboration, Comment, Component, Constraint, DataType, Exception, Flow, Generalization, Interface, Link, Model, ModelElement, Node, NodeInstance, ObjectFlowState, Operation, Package, Permission, Signal, Subsystem and Usage) or the artifact classes that derive from them. The stereotype will then be available to artifacts that derive from that same metaclass or that artifact.

Namespace

Drop down selector. Records the namespace for the stereotype. This is the package hierarchy.

Modifiers

Check box, with entries Abstract, Leaf and Root.

  • Abstract is used to declare that artifacts that use this stereotype cannot be instantiated, but must always be specialized.

  • Leaf indicates that artifacts that use this stereotype can have no further sub-types, while Root indicates it is a top level artifact.

[Caution]Caution

Remember that these modifiers apply to the artifacts using the stereotype, not just the stereotype.

[Warning]Warning

ArgoUML neither imposes, nor checks that artifacts using a stereotype adopt the stereotype's modifiers.

Generalizations

Text area. Lists any stereotype that generalizes this stereotype.

[Caution]Caution

It is not clear that generalizing stereotypes makes much sense.

Specializations

Text box. Lists any specialized stereotype (i.e. for which this stereotype is a generalization.

[Caution]Caution

It is not clear that specializing stereotypes makes much sense.