HOME

TheInfoList



OR:

A stereotype is one of three types of extensibility mechanisms in the
Unified Modeling Language The Unified Modeling Language (UML) is a general-purpose visual modeling language that is intended to provide a standard way to visualize the design of a system. UML provides a standard notation for many types of diagrams which can be roughly ...
(UML), the other two being tags and constraints. They allow designers to extend the vocabulary of UML in order to create new model elements, derived from existing ones, but that have specific properties that are suitable for a particular domain or otherwise specialized usage. The nomenclature is derived from the original meaning of
stereotype In social psychology, a stereotype is a generalization, generalized belief about a particular category of people. It is an expectation that people might have about every person of a particular group. The type of expectation can vary; it can ...
, used in
printing Printing is a process for mass reproducing text and images using a master form or template. The earliest non-paper products involving printing include cylinder seals and objects such as the Cyrus Cylinder and the Cylinders of Nabonidus. The ...
. For example, when modeling a network, one might need to have symbols for representing routers and hubs. By using stereotyped nodes, these can be made to appear as primitive building blocks. Graphically, a stereotype is rendered as a name enclosed by
guillemets Guillemets (, also , , ) are a pair of punctuation marks in the form of sideways double Chevron (insignia), chevrons, and , used as quotation marks in some languages. In some of these languages, "single" guillemets, and , are used for a quotat ...
(« » or, if guillemets proper are unavailable, << >>) and placed above the name of another element. In addition, or alternatively, it may be indicated by a specific icon. The icon image may even replace the entire UML symbol. For instance, in a class diagram stereotypes can be used to # classify method behavior, e.g. with «constructor» and «getter» and # refine the classifier itself, e.g. with «interface».
Object Management Group The Object Management Group (OMG®) is a computer industry Standards Development Organization (SDO), or Voluntary Consensus Standards Body (VCSB). OMG develops enterprise integration and modeling standards for a range of technologies. Busin ...
,
OMG® Unified Modeling Language® (OMG UML®)
', v2.5.1, p. 170, December 2017.
One alternative to stereotypes, suggested by
Peter Coad Peter Coad (born December 30, 1953) is a software entrepreneur and author of books on Computer programming, programming. He is notable for his role in defining what have come to be known as the UML colors, a color-coded Writing systems, notation c ...
in his book ''Java Modeling in Color with UML: Enterprise Components and Process'' is the use of colored
archetypes The concept of an archetype ( ) appears in areas relating to behavior, historical psychology, philosophy and literary analysis. An archetype can be any of the following: # a statement, pattern of behavior, prototype, "first" form, or a main mo ...
. The archetypes indicated by different-colored UML boxes can be used in combination with stereotypes. This added definition of meaning indicates the role that the UML object plays within the larger software system.


Stereotype attributes

From version 2.0 the previously independent tagged value is considered to be a ''stereotype attribute''. The name ''tagged value'' is still kept. Each stereotype has zero or more ''tag definitions'', and all stereotyped UML elements have the corresponding number of tagged values.


UML-defined stereotypes


Become

In UML, become is a keyword for a specific UML stereotype, and applies to a dependency (modeled as a dashed arrow). Become shows that the source modeling element (the arrow's tail) is transformed into the target modeling element (the arrow's head), while keeping some sort of identity, even though it may have changed values,
state State most commonly refers to: * State (polity), a centralized political organization that regulates law and society within a territory **Sovereign state, a sovereign polity in international law, commonly referred to as a country **Nation state, a ...
, or even class. While UML 2.1 uses the «become» stereotype within the specification, it does not define it.


Examples

For example, three are used in the
entity–control–boundary The entity–control–boundary (ECB), or entity–boundary–control (EBC), or boundary–control–entity (BCE) is an architectural pattern used in Use case, use-case–driven object-oriented programming that structures the Class (computer prog ...
pattern (ECB or BCE pattern) and four in the robustness diagram (Boundary, Control, Entity and Actor).


See also

* Profile (UML) *
Entity–control–boundary The entity–control–boundary (ECB), or entity–boundary–control (EBC), or boundary–control–entity (BCE) is an architectural pattern used in Use case, use-case–driven object-oriented programming that structures the Class (computer prog ...


References


External links


UML Stereotype
Unified Modeling Language {{uml-stub