Description
A classifier can specify a generalization hierarchy by referencing its general classifiers.
Attributes
get of general metarelationships or generalization relationships. Default value is false.
not self.allParents()->includes(self)
self.parents()->forAll(c | self.maySpecializeType(c))
self.inheritedMember->includesAll(self.inherit(self.parents()->collect(p | p.inheritableMembers(self)))
Classifier::parents(): Set(Classifier);
parents = general
Classifier::allParents(): Set(Classifier);
allParents = self.parents()->union(self.parents()->collect(p | p.allParents())
Classifier::inheritableMembers(c: Classifier): Set(NamedElement);
pre: c.allParents()->includes(self)
inheritableMembers = member->select(m | c.hasVisibilityOf(m))
Classifier::hasVisibilityOf(n: NamedElement) : Boolean;
pre: self.allParents()->collect(c | c.member)->includes(n)
hasVisibilityOf =true
Classifier::inherit(inhs: Set(NamedElement)): Set(NamedElement);
inherit = inhs
Classifier::maySpecializeType(c : Classifier) : Boolean;
maySpecializeType = self.oclIsKindOf(c.oclType)
The specific semantics of how generalization affects each concrete subtype of Classifier varies.
An instance of a specific Classifier is also an (indirect) instance of each of the general Classifiers. 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.
Notation
The name of an abstract Classifier is shown in italics.
Generalization is shown as a line with an 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 "separate target style". See the example section below.
Presentation Options
Multiple Classifiers that have the same general classifier can be shown together in the "shared target style". See the >example section below.
An abstract Classifier can be shown using the keyword {abstract} after or below the name of the Classifier.
Examples