Stereotype (computing)
Encyclopedia
A stereotype is one of three types of extensibility mechanisms
Extensibility
In software engineering, extensibility is a system design principle where the implementation takes into consideration future growth. It is a systemic measure of the ability to extend a system and the level of effort required to implement the extension...

 in the Unified Modeling Language
Unified Modeling Language
Unified Modeling Language is a standardized general-purpose modeling language in the field of object-oriented software engineering. The standard is managed, and was created, by the Object Management Group...

 (UML). 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 problem domain or otherwise specialized usage. The nomenclature is derived from the original meaning of stereotype
Stereotype (printing)
In printing, a stereotype, also known as a cliché, stereoplate or simply a stereo, was originally a "solid plate or type-metal, cast from a papier-mâché or plaster mould taken from the surface of a forme of type" used for printing instead of the original...

, used in printing
Printing
Printing is a process for reproducing text and image, typically with ink on paper using a printing press. It is often carried out as a large-scale industrial process, and is an essential part of publishing and transaction printing....

. For example, when modeling a network you might need to have symbols for representing routers and hubs. By using stereotyped nodes you can make these things appear as primitive building blocks.

Graphically, a stereotype is rendered as a name enclosed by guillemets
Guillemets
Guillemets , also called angle quotes, are line segments, pointed as if arrows , sometimes forming a complementary set of punctuation marks used as a form of quotation mark....

 (« » 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 such as «constructor» and «getter». Despite its appearance, «interface» is not a stereotype but a classifier
Classifier (UML)
A classifier is a category of Unified Modeling Language elements that have some common features, such as attributes or methods.A classifier is an abstract metaclass classification concept that serves as a mechanism to show interfaces, classes, datatypes and components.A classifier describes a set...

.

One alternative to stereotypes, suggested by Peter Coad
Peter Coad
Peter Coad is a software entrepreneur and author of books on programming. He is notable for his role in defining what have come to be known as the UML colors, a color-coded notation chiefly useful for simplifying one's understanding of a design or model.-Education:Coad received a Bachelor of...

 in his book Java Modeling in Color with UML: Enterprise Components and Process is the use of colored archetypes
UML colors
UML color standards are a set of four colors associated with Unified Modeling Language diagrams. The coloring system indicates which of several archetypes apply to the UML object...

. 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.

Become

In UML, become is a keyword
Keyword (computer programming)
In computer programming, a keyword is a word or identifier that has a particular meaning to the programming language. The meaning of keywords — and, indeed, the meaning of the notion of keyword — differs widely from language to language....

 for a specific UML stereotype, and applies to a dependency
Dependency (UML)
A dependency in the Unified Modeling Language exists between two defined elements if a change to the definition of one may result in a change to the other...

 (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 (computer science)
In computer science and automata theory, a state is a unique configuration of information in a program or machine. It is a concept that occasionally extends into some forms of systems programming such as lexers and parsers....

, or even class.

While UML 2.1 uses the «become» stereotype within the specification, it does not define it.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK