Abstract Class UML 2.5::Classifier
Description:
A Classifier represents a classification of instances according to their
Features.
Direct Superclasses: Namespace,
Type,
TemplateableElement,
RedefinableElementDirect Subclasses: StructuredClassifier,
Signal,
Interface,
InformationItem,
DataType,
BehavioredClassifier,
Association,
ArtifactClass Precedence List: Classifier,
Namespace,
Type,
PackageableElement,
ParameterableElement,
TemplateableElement,
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 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 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 package :
Package (0 1); -- source
Type visibility :
VisibilityKind (0 1); -- source
PackageableElement owningTemplateParameter :
TemplateParameter (0 1); -- source
ParameterableElement templateBinding :
TemplateBinding (0 *); -- source
TemplateableElement 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:
No additional constraints.
Operations:
Signature: parents() : Classifier;
Description: The query parents() gives all of the immediate ancestors of a generalized
Classifier.
Expression: result = (generalization.general->asSet())
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.
Expression: result = (self.oclIsKindOf(c.oclType()))
Signature: isTemplate() : Boolean;
Description: The query isTemplate() returns whether this Classifier is actually a template.
Expression: result = (ownedTemplateSignature <> null or general->exists(g | g.isTemplate()))
Signature: isSubstitutableFor(contract : Classifier; ) : Boolean;
Description: Expression: result = (substitution.contract->includes(contract))
Signature: inheritedMember.1() : NamedElement;
Description: The inheritedMember association is derived by inheriting the inheritable
members of the parents.
Expression: result = (inherit(parents()->collect(inheritableMembers(self))->asSet()))
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.
Expression: result = (member->select(m | c.hasVisibilityOf(m)))
Signature: inherit(inhs : NamedElement; ) : NamedElement;
Description: The query inherit() defines how to inherit a set of elements passed as
its argument. It excludes redefined elements from the result.
Expression: result = (inhs->reject(inh | inh.oclIsKindOf(RedefinableElement) and ownedMember->select(oclIsKindOf(RedefinableElement))-> select(redefinedElement->includes(inh.oclAsType(RedefinableElement))) ->notEmpty()))
Signature: hasVisibilityOf(n : NamedElement; ) : Boolean;
Description: The query hasVisibilityOf() determines whether a NamedElement is visible
in the classifier. Non-private members are visible. It is only called when
the argument is something owned by a parent.
Expression: result = (n.visibility <> VisibilityKind::private)
Signature: general.1() : Classifier;
Description: The general Classifiers are the ones referenced by the Generalization relationships.
Expression: result = (parents())
Signature: directlyUsedInterfaces() : Interface;
Description: The Interfaces directly used by this Classifier
Expression: result = ((supplierDependency-> select(oclIsKindOf(Usage) and client->forAll(oclIsKindOf(Interface))))-> collect(client.oclAsType(Interface))->asSet())
Signature: directlyRealizedInterfaces() : Interface;
Description: The Interfaces directly realized by this Classifier
Expression: result = ((clientDependency-> select(oclIsKindOf(Realization) and supplier->forAll(oclIsKindOf(Interface))))-> collect(supplier.oclAsType(Interface))->asSet())
Signature: conformsTo(other : Type; ) : 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 = (if other.oclIsKindOf(Classifier) then let otherClassifier : Classifier = other.oclAsType(Classifier) in self = otherClassifier or allParents()->includes(otherClassifier) else false endif)
Signature: allUsedInterfaces() : Interface;
Description: The Interfaces used by this Classifier and all of its generalizations
Expression: result = (directlyUsedInterfaces()->union(self.allParents()->collect(directlyUsedInterfaces()))->asSet())
Signature: allSlottableFeatures() : StructuralFeature;
Description: All StructuralFeatures related to the Classifier that may have Slots, including
direct attributes, inherited attributes, private attributes in generalizations,
and memberEnds of Associations, but excluding redefined StructuralFeatures.
Expression: result = (member->select(oclIsKindOf(StructuralFeature))-> collect(oclAsType(StructuralFeature))-> union(self.inherit(self.allParents()->collect(p | p.attribute)->asSet())-> collect(oclAsType(StructuralFeature)))->asSet())
Signature: allRealizedInterfaces() : Interface;
Description: The Interfaces realized by this Classifier and all of its generalizations
Expression: result = (directlyRealizedInterfaces()->union(self.allParents()->collect(directlyRealizedInterfaces()))->asSet())
Signature: allParents() : Classifier;
Description: The query allParents() gives all of the direct and indirect ancestors of
a generalized Classifier.
Expression: result = (parents()->union(parents()->collect(allParents())->asSet()))
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))->collect(oclAsType(Feature))->asSet())
Signature: allAttributes() : Property;
Description: The query allAttributes gives an ordered set of all owned and inherited
attributes of the Classifier. All owned attributes appear before any inherited
attributes, and the attributes inherited from any more specific parent
Classifier appear before those of any more general parent Classifier. However,
if the Classifier has multiple immediate parents, then the relative ordering
of the sets of attributes from those parents is not defined.
Expression: result = (attribute->asSequence()->union(parents()->asSequence().allAttributes())->select(p | member->includes(p))->asOrderedSet())
Send questions or comments to
[email protected].