Previous | Table of Contents | Next |
A classifier is a type and can own generalizations, thereby making it possible to define generalization relationships to other
classifiers.
Attributes
No additional attributes
Generalizations
• “Type? on page 85
• “Classifier (as specialized)? on page 82
Associations
• generalization: Generalization[*] Specifies the Generalization relationships for this Classifier. These Generalizations navigate to more general classifiers in the generalization hierarchy. Subsets Element::ownedElement.
• / general : Classifier[*] Specifies the general Classifiers for this Classifier. This is derived.
Constraints
[1] The general classifiers are the classifiers referenced by the generalization relationships.
general = self.parents()
Additional Operations
[1] The query parents() gives all of the immediate ancestors of a generalized Classifier.
Classifier::parents(): Set(Classifier);parents = generalization.general
[2] The query conformsTo() gives true for a classifier that defines a type that conforms to another. This is used, for example,
in the specification of signature conformance for operations.
Classifier::conformsTo(other: Classifier): Boolean;conformsTo = (self=other) or (self.allParents()->includes(other))
Semantics
A Classifier may participate in generalization relationships with other Classifiers. An instance of a specific Classifier
is also an (indirect) instance of the general Classifier. The specific semantics of how generalization affects each concrete
subtype of Classifier varies. A Classifier defines a type. Type conformance between generalizable Classifiers is defined so
that a Classifier conforms to itself and to all of its ancestors in the generalization hierarchy.
Notation
No additional notation
Examples
See Generalization