|Previous||UML Classes||Table of Contents||UML Packages||Next|
A generalization is a taxonomic relationship between a more general classifier and a more specific classifier. Each instance
of the specific classifier is also an indirect instance of the general classifier. Thus, the specific classifier inherits
the features of the more general classifier.
DirectedRelationship (from Kernel ) on page 62
A generalization relates a specific classifier to a more general classifier, and is owned by the specific classifier.
A generalization can be designated as being a member of a particular generalization set.
• isSubstitutable: Boolean [0..1] Indicates whether the specific classifier can be used wherever the general classifier can be used. If true, the execution traces of the specific classifier will be a superset of the execution traces of the general classifier.
• general: Classifier  References the general classifier in the Generalization relationship. Subsets
• specific: Classifier  References the specializing classifier in the Generalization relationship. Subsets DirectedRelationship ::source
• generalizationSet Designates a set in which instances of Generalization are considered members.
No additional constraints
 Every Generalization associated with a given GeneralizationSet must have the same general Classifier. That is, all Generalizations
for a particular GeneralizationSet must have the same superclass.
Where a generalization relates a specific classifier to a general classifier, each instance of the specific classifier is
also an instance of the general classifier. Therefore, features specified for instances of the general classifier are implicitly
specified for instances of the specific classifier. Any constraint applying to instances of the general classifier also applies
to instances of the specific classifier.
Each Generalization is a binary relationship that relates a specific Classifier to a more general Classifier (i.e., a subclass).
Each GeneralizationSet contains a particular set of Generalization relationships that collectively describe the way in which
a specific Classifier (or class) may be divided into subclasses. The generalizationSet associates those instances of a Generalization
with a particular GeneralizationSet .
For example, one Generalization could relate Person as a general Classifier with a Female Person as the specific Classifier.
Another Generalization could also relate Person as a general Classifier, but have Male Person as the specific Classifier.
These two Generalizations could be associated with the same GeneralizationSet , because they specify one way of partitioning
the Person class.
A Generalization is shown as a line with a hollow triangle as an arrowhead between the symbols representing the involved classifiers.
The arrowhead points to the symbol representing the general classifier. This notation is referred to as the separate target
style. See the example section below.
A generalization is shown as a line with a hollow triangle as an arrowhead between the symbols representing the involved classifiers.
The arrowhead points to the symbol representing the general classifier. When these relationships are named, that name designates
the GeneralizationSet to which the Generalization belongs. Each GeneralizationSet has a name (which it inherits since it is
a subclass of PackageableElement ). Therefore, all Generalization relationships with the same
GeneralizationSet name are part of the same GeneralizationSet . This notation form is depicted in a), Figure 7.42.
When two or more lines are drawn to the same arrowhead, as illustrated in b), Figure 7.42, the specific Classifiers are part
of the same GeneralizationSet . When diagrammed in this way, the lines do not need to be labeled separately; instead the generalization
set need only be labeled once. The labels are optional because the GeneralizationSet is clearly designated.
Lastly in c), Figure 7.42, a GeneralizationSet can be designated by drawing a dashed line across those lines with separate
arrowheads that are meant to be part of the same set, as illustrated at the bottom
of Figure 7.42. Here, as with b), the
GeneralizationSet may be labeled with a single name, instead of each line labeled separately. However, such labels are optional
because the GeneralizationSet is clearly designated.
another one Generalization Set Generalization Set
generalization generalization generalization set name-2
set name-1 set name-1
a) GeneralizationSet sharing same general Classifier using the same generalization relationship names.
b) GeneralizationSet designation by subtypes sharing a common generalization arrowhead.
c) GeneralizationSet sharing same general Classifier using the dashed-line notation.
Figure 7.42 - GeneralizationSet designation notations
Multiple Generalization relationships that reference the same general classifier can be connected together in the shared target
style. See the example section below.
Issue 8093 -Correct text to match figure.
In Figure 7.44, the Person class can be specialized as either a Female Person or a Male Person. Furthermore, Person’
s can be specialized as an Employee. Here, Female Person or a Male Person of Person constitute one GeneralizationSet and Employee
another. This illustration employs the notation forms depicted in the diagram above.