Abstract Class UML 2.3::Classifier
Description:
Classifier is defined to be a kind of templateable element so that a classifier
can be parameterized. It is also defined to be a kind of parameterable
element so that a classifier can be a formal template parameter.
Direct Superclasses: TemplateableElement,
Type,
Namespace,
RedefinableElementDirect Subclasses: StructuredClassifier,
Signal,
Interface,
InformationItem,
DataType,
BehavioredClassifier,
Association,
ArtifactClass Precedence List: Classifier,
TemplateableElement,
Type,
PackageableElement,
ParameterableElement,
Namespace,
RedefinableElement,
NamedElement,
ElementProperties:

attribute :
Property (0 *); -- source
Classifier
collaborationUse :
CollaborationUse (0 *); -- source
Classifier
feature :
Feature (0 *); -- source
Classifier
general :
Classifier (0 *); -- source
Classifier
generalization :
Generalization (0 *); -- source
Classifier
inheritedMember :
NamedElement (0 *); -- source
Classifier
isAbstract : Boolean (1 1); -- source
Classifier If true, the Classifier does not provide a complete declaration and can
typically not be instantiated. An abstract classifier is intended to be
used by other classifiers e.g. as the target of general metarelationships
or generalization relationships.
Default value: FALSE

isFinalSpecialization : Boolean (1 1); -- source
Classifier
ownedTemplateSignature :
RedefinableTemplateSignature (0 1); -- source
Classifier
ownedUseCase :
UseCase (0 *); -- source
Classifier
powertypeExtent :
GeneralizationSet (0 *); -- source
Classifier
redefinedClassifier :
Classifier (0 *); -- source
Classifier
representation :
CollaborationUse (0 1); -- source
Classifier
substitution :
Substitution (0 *); -- source
Classifier
templateParameter :
ClassifierTemplateParameter (0 1); -- source
Classifier
useCase :
UseCase (0 *); -- source
Classifier
templateBinding :
TemplateBinding (0 *); -- source
TemplateableElement
package :
Package (0 1); -- source
Type
visibility :
VisibilityKind (1 1); -- source
PackageableElement
owningTemplateParameter :
TemplateParameter (0 1); -- source
ParameterableElement
elementImport :
ElementImport (0 *); -- source
Namespace
importedMember :
PackageableElement (0 *); -- source
Namespace
member :
NamedElement (0 *); -- source
Namespace
ownedMember :
NamedElement (0 *); -- source
Namespace
ownedRule :
Constraint (0 *); -- source
Namespace
packageImport :
PackageImport (0 *); -- source
Namespace
isLeaf : Boolean (1 1); -- source
RedefinableElement
redefinedElement :
RedefinableElement (0 *); -- source
RedefinableElement
redefinitionContext :
Classifier (0 *); -- source
RedefinableElement
clientDependency :
Dependency (0 *); -- source
NamedElement
name : String (0 1); -- source
NamedElement
nameExpression :
StringExpression (0 1); -- source
NamedElement
namespace :
Namespace (0 1); -- source
NamedElement
qualifiedName : String (0 1); -- source
NamedElement
ownedComment :
Comment (0 *); -- source
Element
ownedElement :
Element (0 *); -- source
Element
owner :
Element (0 1); -- source
ElementConstraints:
Signature: specialize_type() : Boolean;
Description: A classifier may only specialize classifiers of a valid type.
Expression: self.parents()->forAll(c | self.maySpecializeType(c))
Signature: non_final_parents() : Boolean;
Description: The parents of a classifier must be non-final.
Expression: self.parents()->forAll(not isFinalSpecialization)
Signature: no_cycles_in_generalization() : Boolean;
Description: Generalization hierarchies must be directed and acyclical. A classifier
can not be both a transitively general and transitively specific classifier
of the same classifier.
Expression: not self.allParents()->includes(self)
Signature: maps_to_generalization_set() : Boolean;
Description: The Classifier that maps to a GeneralizationSet may neither be a specific
nor a general Classifier in any of the Generalization relationships defined
for that GeneralizationSet. In other words, a power type may not be an
instance of itself nor may its instances also be its subclasses.
Expression: true
Signature: generalization_hierarchies() : Boolean;
Description: Generalization hierarchies must be directed and acyclical. A classifier
can not be both a transitively general and transitively specific classifier
of the same classifier.
Expression: not self.allParents()->includes(self)
Operations:
Signature: parents() : Classifier;
Description: The query parents() gives all of the immediate ancestors of a generalized Classifier.
The OCL used here is not normative.Editor's notes: self.generalization is a Set, we want the general of each of its elements.
Expression: result = generalization->collect(general)
Original: result = generalization.general
Signature: maySpecializeType(c : Classifier; ) : Boolean;
Description: The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type. By default a classifier may specialize classifiers of the same or a more general type. It is intended to be redefined by classifiers that have different specialization constraints.
The OCL used here is not normative.Editor's notes: oclType() not oclType. No such operator in OCL AFAIK. But I have one for this purpose.
Expression: result = self.oclIsKindOf(c.oclType())
Original: result = self.oclIsKindOf(c.oclType)
Signature: isTemplate() : Boolean;
Description: The query isTemplate() returns whether this templateable element is actually a template.
The OCL used here is not normative.Editor's notes: Templateable not Templatable.
Expression: result = oclAsType(TemplateableElement).isTemplate() or general->exists(g | g.isTemplate())
Original: result = oclAsType(TemplatableElement).isTemplate() or general->exists(g | g.isTemplate())
Signature: hasVisibilityOf(n : NamedElement; ) : Boolean;
Description: The query hasVisibilityOf() determines whether a named element is visible in the classifier. By default all are visible. It is only called when the argument is something owned by a parent.
The OCL used here is not normative.Editor's notes: I rewrote inheritedMember to not use inheritableMembers and hasVisibilityOf.
These produce an non-progressing recursion (calling each other with no change in arguments).
Expression: Set {}
Original: result = if (self.inheritedMember->includes(n)) then (n.visibility <> #private) else true
Signature: inheritedMember.1() : NamedElement;
Description: The inheritedMember association is derived by inheriting the inheritable members of the parents.
The OCL used here is not normative.Editor's notes: I rewrote inheritedMember to not use inheritableMembers and hasVisibilityOf.
These produce an non-progressing recursion (calling each other with no change in arguments).
Expression: result = self.inheritedMemberAux()->asSet()
Original: result = self.inherit(self.parents()->collect(p | p.inheritableMembers(self))
Signature: inheritedMemberAux() : NamedElement;
Description: The inheritedMember association is derived by inheriting the inheritable members of the parents.
Editor's notes: This is a new function defined to correct the problem of non-progressing recursion
of the normative inheritedMember.1
Expression: result = let directs = self.parents()->reject(x | x.visibility = #private) in
if directs->isEmpty()
then directs
else directs->collect(x | x.inheritedMemberAux())->union(directs) endif
Signature: inheritableMembers(c : Classifier; ) : NamedElement;
Description: The query inheritableMembers() gives all of the members of a classifier that may be inherited in one of its descendants, subject to whatever visibility restrictions apply.
The OCL used here is not normative.Editor's notes: I rewrote inheritedMember to not use inheritableMembers and hasVisibilityOf.
These produce an non-progressing recursion (calling each other with no change in arguments).
Expression: Set{}
Original: result = member->select(m | c.hasVisibilityOf(m))
Signature: inherit(inhs : NamedElement; ) : NamedElement;
Description: The query inherit() defines how to inherit a set of elements. Here the operation is defined to inherit them all. It is intended to be redefined in circumstances where inheritance is affected by redefinition.
Expression: result = inhs
Signature: general.1() : Classifier;
Description: The general classifiers are the classifiers referenced by the generalization relationships.
Expression: result = self.parents()
Signature: conformsTo(other : Classifier; ) : Boolean;
Description: 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.
Expression: result = (self=other) or (self.allParents()->includes(other))
Signature: allParents() : Classifier;
Description: The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier.
The OCL used here is not normative.Editor's notes: Missing close paren.
Expression: result = self.parents()->union(self.parents()->collect(p | p.allParents()))
Original: result = self.parents()->union(self.parents()->collect(p | p.allParents())
Signature: allFeatures() : Feature;
Description: The query allFeatures() gives all of the features in the namespace of the classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature.
Expression: result = member->select(oclIsKindOf(Feature))
Send questions or comments to
[email protected].