Currently I am reading UML Distilled - Third Edition
(Martin Fowler) to catch up some new thoughts and spot interesting things I am not yet aware of.
On of those things I came up is the differentiation between generalization and classification.
In Chapter 5 - Class Diagrams: Advanced Concepts
, Martin Fowler wrote at the end of the section Classification and Generalization
on page 76
: "The UML uses the generalization symbol to show generalization. If you need to show classification, use a dependency with the ‹‹instantiate›› keyword".
Nevertheless, figure 5.11
from the following section (Multiple and Dynamic Classification
) depicts "generalization sets" with generalization arrowheads, including an additional "discriminator" (generalization set name) per set.
It also states at the end of the continued paragraph on page 77
: "Single classification corresponds to a single generalization set with no name".
I am a bit confused now. First, it is told that one shall use a "dependency with the ‹‹instantiate›› keyword" for classification but then for "multiple classifications" one is supposed to use "generalization arrowheads" but with an additional "discriminator". So far, so good. Since single and multiple classification are two different things, I can follow the distinction from "general generalizations" because of the discriminator.
But "single classification" would then look like a "normal" generalization because the "set name" is to be omitted?! It sounds somehow contradictory to the very first statement about the "dependency relation and the ‹‹instantiate›› keyword" to me.
May someone could please clarify and explain this to me, ideally with some sort of an example?
Kind regards Chilippso
--edit--
I have read the sections in question again and I think I have a better idea now, what it is about. I think, either this is related somehow to the meta-model itself or it is about object diagrams, since section Multiple and Dynamic Classification
starts with: "Classification refers to the relationship between an object and its type".
So, if I have to classify a class itself, then the classifying class have to be a metaclass for it's objects to be classes themselves. Or I am classifying an object - but then this topic is more related to object models in my naive view of things.
Is this assumptation correct? It would also match the note on the meaning of the ‹‹instantiate››
Dependency-Keyword from Tabel 3.1
on page 48
: "Note that if the source is a class, the class itself is an instance of the class class; that is, the target class is a metaclass".