Stereotype Classification

Stereotypes are part of the UnifiedModelingLanguage and provide what is called a language extension mechanism.

For example, if you wanted to categorize classes by function like in the IvarJacobson Interface, Controller, Entity scheme, you would create three stereotypes and specify each class as one of the three types.

Stereotypes are one of the most unexpected parts of the UnifiedModelingLanguage and are really interesting in their capability for improving (and obfuscating if used improperly) a software design.

Stereotypes can (and in my opinion should) be denoted using a custom graphic symbol, if they are not, then they are surrounded by guillemots.

See the UML Notation Guide for additional details.

Also, can someone edit this page and express stereotypes as a pattern?

-- DionHinchcliffe

DougLea has a pattern called RolesBeforeObjects?. I think that a StereotypeClassification is much the same as a role.

The gist of it is that any object may play multiple roles in a software system. At some point in the process it is more convenient to refer to the role rather than the object. (Maybe the object has not even been decided yet.)

Roles can come from the requirements, e.g. from things or actions the customer talks about. Roles can also come from design, e.g. the participants in a pattern. Objects may participate (i.e. have a role in) multiple patterns.


Stereotypes are really a fairly generic extension mechanism. And as such I was/am intriqued by the possibility of expressing the concept as a pattern. Sure, a stereotype can denote the role of a class, object, association, etc. but it can also be used for a variety of other ways to extend UnifiedModelingLanguage constructs.

You can use stereotypes to subtype a UML construct such as a class or association (i.e. you can create a stereotype for AbstractClass or AliasAssociation? or OwnerAssociation?). The ThreeAmigos have put no limits on what you can use a stereotype for, they just suggest that it is semantically clear what you are trying to do.

PatrickLogan: Unfortunately, the Wiki link you give above for RolesBeforeObjects? doesn't seem to work but I'd be interesting in seeing it and using it's ideas to start a StereotypePattern? Wiki page. I'll check back if someone will update/create the Wiki page and we'll see what we can do.

-- DionHinchcliffe, January 16th, 1998

View edit of September 15, 2003 or FindPage with title or text search