-
Key: UMLR-392
-
Status: open
-
Source: Change Vision ( Michael Chonoles)
-
Summary:
A powerful and common modeling situation is the need to have a subclass for every value of an enumeration type. This is similar to the need for using PowerTypes, but without the capability of dynamically creating new specific instances (subclasses).
Some uses:
For example, on a project there may be 100 commandKinds. I'd make an enumeration type of the commands, and want a simple way of declaring that for possible enumeration type there is subclass of command.This use is similar to what was once possible with discriminators in UML 1.x
This can be tied to the use of qualifiers to make some powerful idioms. A Team can have an association to TeamPlayer, that is qualified by PositionKind. The team can be said to have at least one TeamPlay for each PositionKind. And if the same PositionKind is used as the PowerType for a specialization of TeamPlayer, we have a subclass of TeamPlayer per PositionKind.
An enumeration type powerType can be also be powerfully used in some model transformations. A class containing an enumeration attribute can be converted to a class w/o the attribute but with a set of specialized subclasses, each with value of the enumeration type. Of vice versa. This sort of transformation is common when moving from analysis to design.
-
Reported: UML 2.5 — Fri, 21 Nov 2014 04:51 GMT
-
Updated: Fri, 6 Mar 2015 20:57 GMT
UMLR — Generalizations should allow enumeration types as PowerTypes.
- Key: UMLR-392
- OMG Task Force: UML 2.6 RTF