Pergunta

I'm using Enterprise Architect to make a UML class diagram (and in the end generate PHP5 code with it). I can add attributes to a class. For each attribute I can select a stereotype: DomainCodedValue, Field, SubTypeField, Property, Property, column, struct, union, global, with events, ConversationAssociation, ParticipantAssociation, Property, SM_Activity, input element, select element, textarea element.

What exactly are stereotypes?

Foi útil?

Solução

The UML specification says that:

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.

In that definition a metaclass is a class in the UML meta model (e.g. Class, Interface, Component, Association, Property etc.) That means that stereotypes may be applied to elements in a UML diagram.

For instance, when you annotate a Property with a «DomainCodedValue» stereotype, you are modeling that such property has the special semantics of a DomainCodedValue (whatever it is), which refines the semantics of Property.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top