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:
![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
attribute :
Property (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
collaborationUse :
CollaborationUse (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
feature :
Feature (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
general :
Classifier (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
generalization :
Generalization (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
inheritedMember :
NamedElement (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
isAbstract : Boolean (1 1); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
isFinalSpecialization : Boolean (1 1); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
ownedTemplateSignature :
RedefinableTemplateSignature (0 1); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
ownedUseCase :
UseCase (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
powertypeExtent :
GeneralizationSet (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
redefinedClassifier :
Classifier (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
representation :
CollaborationUse (0 1); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
substitution :
Substitution (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
templateParameter :
ClassifierTemplateParameter (0 1); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
useCase :
UseCase (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
templateBinding :
TemplateBinding (0 *); -- source
TemplateableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
package :
Package (0 1); -- source
Type![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
visibility :
VisibilityKind (1 1); -- source
PackageableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
owningTemplateParameter :
TemplateParameter (0 1); -- source
ParameterableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
elementImport :
ElementImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
importedMember :
PackageableElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
member :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
ownedMember :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
ownedRule :
Constraint (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
packageImport :
PackageImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
isLeaf : Boolean (1 1); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
redefinedElement :
RedefinableElement (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
redefinitionContext :
Classifier (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
clientDependency :
Dependency (0 *); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
name : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
nameExpression :
StringExpression (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
namespace :
Namespace (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
qualifiedName : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=10225%3AACB426B92553DDDAF4BBA111FA183E25)
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].