16.8. Stereotypes, Profiles, and Tags
As with keywords, stereotypes are shown with guillemets symbols[4], such as «authorship». But, they are not keywords, which can be confusing. A stereotype represents a refinement of an existing modeling concept and is defined within a UML profile informally, a collection of related stereotypes, tags, and constraints to specialize the use of the UML for a specific domain or platform, such as a UML profile for project management or for data modeling.
[4] Guillemets are special single -character brackets most widely known by their use in French typography to indicate a quote. Typographically challenged tool vendors often substitute two angle brackets ('<< >>') for the more elegant '« »'.
The UML predefines many stereotypes[5], such as «destroy» (used on sequence diagrams), and also allows user-defined ones. Thus, stereotypes provide an extension mechanism in the UML.
[5] See the UML specification.
For example, Figure 16.8 shows a stereotype declaration, and its use. The stereotype declares a set of tags , using the attribute syntax. When an element (such as the Square class) is marked with a stereotype, all the tags apply to the element, and can be assigned values.
Figure 16.8. Stereotype declaration and use.
[View full size image]