org.eclipse.uml2
Interface Classifier

All Superinterfaces:
Element, EModelElement, EObject, NamedElement, Namespace, Notifier, PackageableElement, ParameterableElement, RedefinableElement, TemplateableElement, Type
All Known Subinterfaces:
Activity, Actor, Artifact, Association, AssociationClass, Behavior, BehavioredClassifier, Class, Collaboration, CommunicationPath, Component, DataType, DeploymentSpecification, Device, EncapsulatedClassifier, Enumeration, ExecutionEnvironment, Extension, InformationItem, Interaction, Interface, Node, ParameterableClassifier, PrimitiveType, ProtocolStateMachine, Signal, StateMachine, Stereotype, StructuredClassifier, TemplateableClassifier, UseCase

public interface Classifier
extends Namespace, Type, RedefinableElement

A representation of the model object 'Classifier'. A classifier is a namespace whose members can include features. Classifier is an abstract metaclass. A classifier is a type and can own generalizations, thereby making it possible to define generalization relationships to other classifiers. A classifier can specify a generalization hierarchy by referencing its general classifiers. A classifier is a redefinable element, meaning that it is possible to redefine nested classifiers.

The following features are supported:

See Also:
UML2Package.getClassifier()

Field Summary
static String copyright
           
 
Fields inherited from interface org.eclipse.uml2.NamedElement
SEPARATOR
 
Method Summary
 Set allFeatures()
           A query based on the following OCL expression: member->select(oclIsKindOf(Feature))
 Set allParents()
           A query based on the following OCL expression: self.parents()->union(self.parents()->collect(p | p.allParents())
 boolean conformsTo(Classifier other)
           A query based on the following OCL expression: (self=other) or (self.allParents()->includes(other))
 Generalization createGeneralization(Classifier generalClassifier)
          Creates a generalization between this classifier and the specified general classifier.
 Generalization createGeneralization(EClass eClass)
          Creates a Generalization and appends it to the 'Generalization' containment reference list
 CollaborationOccurrence createOccurrence(EClass eClass)
          Creates a CollaborationOccurrence and appends it to the 'Occurrence' containment reference list
 UseCase createOwnedUseCase(EClass eClass)
          Creates a UseCase and appends it to the 'Owned Use Case' containment reference list
 Substitution createSubstitution(EClass eClass)
          Creates a Substitution and appends it to the 'Substitution' containment reference list
 Set general()
           A query based on the following OCL expression: self.parents()
 Property getAttribute(String unqualifiedName)
          Retrieves the Property with the specified name from the 'Attribute' reference list
 EList getAttributes()
          Returns the value of the 'Attribute' reference list.
 EList getClientDependencies()
           
 Feature getFeature(String unqualifiedName)
          Retrieves the Feature with the specified name from the 'Feature' reference list
 EList getFeatures()
          Returns the value of the 'Feature' reference list.
 Classifier getGeneral(String unqualifiedName)
          Retrieves the Classifier with the specified name from the 'General' reference list
 EList getGeneralizations()
          Returns the value of the 'Generalization' containment reference list.
 EList getGenerals()
          Returns the value of the 'General' reference list.
 NamedElement getInheritedMember(String unqualifiedName)
          Retrieves the NamedElement with the specified name from the 'Inherited Member' reference list
 EList getInheritedMembers()
          Returns the value of the 'Inherited Member' reference list.
 EList getMembers()
           
 CollaborationOccurrence getOccurrence(String unqualifiedName)
          Retrieves the CollaborationOccurrence with the specified name from the 'Occurrence' containment reference list
 EList getOccurrences()
          Returns the value of the 'Occurrence' containment reference list.
 EList getOwnedElements()
           
 EList getOwnedMembers()
           
 UseCase getOwnedUseCase(String unqualifiedName)
          Retrieves the UseCase with the specified name from the 'Owned Use Case' containment reference list
 EList getOwnedUseCases()
          Returns the value of the 'Owned Use Case' containment reference list.
 GeneralizationSet getPowertypeExtent(String unqualifiedName)
          Retrieves the GeneralizationSet with the specified name from the 'Powertype Extent' reference list
 EList getPowertypeExtents()
          Returns the value of the 'Powertype Extent' reference list.
 Classifier getRedefinedClassifier(String unqualifiedName)
          Retrieves the Classifier with the specified name from the 'Redefined Classifier' reference list
 EList getRedefinedClassifiers()
          Returns the value of the 'Redefined Classifier' reference list.
 EList getRedefinedElements()
           
 CollaborationOccurrence getRepresentation()
          Returns the value of the 'Representation' reference
 Substitution getSubstitution(String unqualifiedName)
          Retrieves the Substitution with the specified name from the 'Substitution' containment reference list
 EList getSubstitutions()
          Returns the value of the 'Substitution' containment reference list.
 UseCase getUseCase(String unqualifiedName)
          Retrieves the UseCase with the specified name from the 'Use Case' reference list
 EList getUseCases()
          Returns the value of the 'Use Case' reference list.
 Set getUsedInterfaces()
          Retrieves the interfaces on which this classifier has a usage dependency.
 boolean hasVisibilityOf(NamedElement n)
           A query based on the following OCL expression: true
 Set inherit(Set inhs)
           A query based on the following OCL expression: inhs
 Set inheritableMembers(Classifier c)
           A query based on the following OCL expression: member->select(m | c.hasVisibilityOf(m))
 Set inheritedMember()
           A query based on the following OCL expression: self.inherit(self.parents()->collect(p | p.inheritableMembers(self))
 boolean isAbstract()
          Returns the value of the 'Is Abstract' attribute.
 boolean maySpecializeType(Classifier c)
           A query based on the following OCL expression: self.oclIsKindOf(c.oclType)
 Set parents()
           A query based on the following OCL expression: generalization.general
 void setIsAbstract(boolean value)
          Sets the value of the 'Is Abstract' attribute
 void setRepresentation(CollaborationOccurrence value)
          Sets the value of the 'Representation' reference
 boolean validateGeneralEqualsParents(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: general = self.parents()
 boolean validateInheritedMember(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: self.inheritedMember->includesAll(self.inherit(self.parents()->collect(p | p.inheritableMembers(self)))
 boolean validateNoCyclesInGeneralization(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: not self.allParents()->includes(self)
 boolean validateSpecializeType(DiagnosticChain diagnostics, Map context)
           An invariant constraint based on the following OCL expression: self.parents()->forAll(c | self.maySpecializeType(c))
 
Methods inherited from interface org.eclipse.uml2.Namespace
createElementImport, createOwnedRule, createPackageImport, excludeCollisions, getElementImports, getImportedMember, getImportedMembers, getImportedPackages, getMember, getNamesOfMember, getOwnedRule, getOwnedRules, getPackageImports, importedMember, importElement, importMembers, importPackage, membersAreDistinguishable, validateImportedMemberDerived, validateMembersAreDistinguishable
 
Methods inherited from interface org.eclipse.uml2.NamedElement
allNamespaces, createNameExpression, getClientDependency, getName, getNameExpression, getNamespace, getOwner, getQualifiedName, getVisibility, isDistinguishableFrom, qualifiedName, separator, setName, setNameExpression, setVisibility, validateNoName, validateQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.TemplateableElement
createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBindings, parameterableElements, setOwnedTemplateSignature
 
Methods inherited from interface org.eclipse.uml2.Element
addKeyword, allOwnedElements, apply, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedVersion, getKeywords, getModel, getNearestPackage, getOwnedComments, getValue, hasKeyword, isApplied, isRequired, mustBeOwned, removeKeyword, setValue, unapply, validateHasOwner, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.uml2.Type
conformsTo, createAssociation, getNamespace, getPackage
 
Methods inherited from interface org.eclipse.uml2.PackageableElement
getPackageableElement_visibility, getVisibility, setPackageableElement_visibility, setVisibility
 
Methods inherited from interface org.eclipse.uml2.ParameterableElement
getOwner, getOwningParameter, getTemplateParameter, setOwningParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.RedefinableElement
getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 

Field Detail

copyright

public static final String copyright

See Also:
Constant Field Values
Method Detail

isAbstract

public boolean isAbstract()
Returns the value of the 'Is Abstract' attribute. The default value is "false".

If the meaning of the 'Is Abstract' attribute isn't clear, there really should be more of a description here...

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 is false.

Returns:
the value of the 'Is Abstract' attribute.
See Also:
setIsAbstract(boolean), UML2Package.getClassifier_IsAbstract()

setIsAbstract

public void setIsAbstract(boolean value)
Sets the value of the 'Is Abstract' attribute.

Parameters:
value - the new value of the 'Is Abstract' attribute.
See Also:
isAbstract()

getFeatures

public EList getFeatures()
Returns the value of the 'Feature' reference list. The list contents are of type Feature. It is bidirectional and its opposite is 'Featuring Classifier'.

If the meaning of the 'Feature' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Feature' reference list.
See Also:
UML2Package.getClassifier_Feature(), Feature.getFeaturingClassifiers()

getFeature

public Feature getFeature(String unqualifiedName)
Retrieves the Feature with the specified name from the 'Feature' reference list.

Parameters:
unqualifiedName - The unqualified name of the Feature to retrieve.
Returns:
The Feature with the specified name, or null.
See Also:
getFeatures()

getInheritedMembers

public EList getInheritedMembers()
Returns the value of the 'Inherited Member' reference list. The list contents are of type NamedElement.

If the meaning of the 'Inherited Member' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Inherited Member' reference list.
See Also:
UML2Package.getClassifier_InheritedMember()

getInheritedMember

public NamedElement getInheritedMember(String unqualifiedName)
Retrieves the NamedElement with the specified name from the 'Inherited Member' reference list.

Parameters:
unqualifiedName - The unqualified name of the NamedElement to retrieve.
Returns:
The NamedElement with the specified name, or null.
See Also:
getInheritedMembers()

getGenerals

public EList getGenerals()
Returns the value of the 'General' reference list. The list contents are of type Classifier.

If the meaning of the 'General' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'General' reference list.
See Also:
UML2Package.getClassifier_General()

getGeneral

public Classifier getGeneral(String unqualifiedName)
Retrieves the Classifier with the specified name from the 'General' reference list.

Parameters:
unqualifiedName - The unqualified name of the Classifier to retrieve.
Returns:
The Classifier with the specified name, or null.
See Also:
getGenerals()

getGeneralizations

public EList getGeneralizations()
Returns the value of the 'Generalization' containment reference list. The list contents are of type Generalization. It is bidirectional and its opposite is 'Specific'.

If the meaning of the 'Generalization' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Generalization' containment reference list.
See Also:
UML2Package.getClassifier_Generalization(), Generalization.getSpecific()

createGeneralization

public Generalization createGeneralization(EClass eClass)
Creates a Generalization and appends it to the 'Generalization' containment reference list.

Parameters:
eClass - The Ecore class of the Generalization to create.
Returns:
The new Generalization.
See Also:
getGeneralizations()

getAttributes

public EList getAttributes()
Returns the value of the 'Attribute' reference list. The list contents are of type Property.

If the meaning of the 'Attribute' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Attribute' reference list.
See Also:
UML2Package.getClassifier_Attribute()

getAttribute

public Property getAttribute(String unqualifiedName)
Retrieves the Property with the specified name from the 'Attribute' reference list.

Parameters:
unqualifiedName - The unqualified name of the Property to retrieve.
Returns:
The Property with the specified name, or null.
See Also:
getAttributes()

getRedefinedClassifiers

public EList getRedefinedClassifiers()
Returns the value of the 'Redefined Classifier' reference list. The list contents are of type Classifier.

If the meaning of the 'Redefined Classifier' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Redefined Classifier' reference list.
See Also:
UML2Package.getClassifier_RedefinedClassifier()

getRedefinedClassifier

public Classifier getRedefinedClassifier(String unqualifiedName)
Retrieves the Classifier with the specified name from the 'Redefined Classifier' reference list.

Parameters:
unqualifiedName - The unqualified name of the Classifier to retrieve.
Returns:
The Classifier with the specified name, or null.
See Also:
getRedefinedClassifiers()

getSubstitutions

public EList getSubstitutions()
Returns the value of the 'Substitution' containment reference list. The list contents are of type Substitution. It is bidirectional and its opposite is 'Substituting Classifier'.

If the meaning of the 'Substitution' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Substitution' containment reference list.
See Also:
UML2Package.getClassifier_Substitution(), Substitution.getSubstitutingClassifier()

getSubstitution

public Substitution getSubstitution(String unqualifiedName)
Retrieves the Substitution with the specified name from the 'Substitution' containment reference list.

Parameters:
unqualifiedName - The unqualified name of the Substitution to retrieve.
Returns:
The Substitution with the specified name, or null.
See Also:
getSubstitutions()

createSubstitution

public Substitution createSubstitution(EClass eClass)
Creates a Substitution and appends it to the 'Substitution' containment reference list.

Parameters:
eClass - The Ecore class of the Substitution to create.
Returns:
The new Substitution.
See Also:
getSubstitutions()

getPowertypeExtents

public EList getPowertypeExtents()
Returns the value of the 'Powertype Extent' reference list. The list contents are of type GeneralizationSet. It is bidirectional and its opposite is 'Powertype'.

If the meaning of the 'Powertype Extent' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Powertype Extent' reference list.
See Also:
UML2Package.getClassifier_PowertypeExtent(), GeneralizationSet.getPowertype()

getPowertypeExtent

public GeneralizationSet getPowertypeExtent(String unqualifiedName)
Retrieves the GeneralizationSet with the specified name from the 'Powertype Extent' reference list.

Parameters:
unqualifiedName - The unqualified name of the GeneralizationSet to retrieve.
Returns:
The GeneralizationSet with the specified name, or null.
See Also:
getPowertypeExtents()

getOwnedUseCases

public EList getOwnedUseCases()
Returns the value of the 'Owned Use Case' containment reference list. The list contents are of type UseCase.

If the meaning of the 'Owned Use Case' containment reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Owned Use Case' containment reference list.
See Also:
UML2Package.getClassifier_OwnedUseCase()

getOwnedUseCase

public UseCase getOwnedUseCase(String unqualifiedName)
Retrieves the UseCase with the specified name from the 'Owned Use Case' containment reference list.

Parameters:
unqualifiedName - The unqualified name of the UseCase to retrieve.
Returns:
The UseCase with the specified name, or null.
See Also:
getOwnedUseCases()

createOwnedUseCase

public UseCase createOwnedUseCase(EClass eClass)
Creates a UseCase and appends it to the 'Owned Use Case' containment reference list.

Parameters:
eClass - The Ecore class of the UseCase to create.
Returns:
The new UseCase.
See Also:
getOwnedUseCases()

getUseCases

public EList getUseCases()
Returns the value of the 'Use Case' reference list. The list contents are of type UseCase. It is bidirectional and its opposite is 'Subject'.

If the meaning of the 'Use Case' reference list isn't clear, there really should be more of a description here...

Returns:
the value of the 'Use Case' reference list.
See Also:
UML2Package.getClassifier_UseCase(), UseCase.getSubjects()

getUseCase

public UseCase getUseCase(String unqualifiedName)
Retrieves the UseCase with the specified name from the 'Use Case' reference list.

Parameters:
unqualifiedName - The unqualified name of the UseCase to retrieve.
Returns:
The UseCase with the specified name, or null.
See Also:
getUseCases()

getRepresentation

public CollaborationOccurrence getRepresentation()
Returns the value of the 'Representation' reference.

If the meaning of the 'Representation' reference isn't clear, there really should be more of a description here...

References a collaboration occurrence which indicates the collaboration that represents this classifier. (Subsets Classifier.occurrence.)

Returns:
the value of the 'Representation' reference.
See Also:
setRepresentation(CollaborationOccurrence), UML2Package.getClassifier_Representation()

setRepresentation

public void setRepresentation(CollaborationOccurrence value)
Sets the value of the 'Representation' reference.

Parameters:
value - the new value of the 'Representation' reference.
See Also:
getRepresentation()

getOccurrences

public EList getOccurrences()
Returns the value of the 'Occurrence' containment reference list. The list contents are of type CollaborationOccurrence.

If the meaning of the 'Occurrence' containment reference list isn't clear, there really should be more of a description here...

References the collaboration occurrences owned by the classifier. (Subsets Element. ownedElement.)

Returns:
the value of the 'Occurrence' containment reference list.
See Also:
UML2Package.getClassifier_Occurrence()

getOccurrence

public CollaborationOccurrence getOccurrence(String unqualifiedName)
Retrieves the CollaborationOccurrence with the specified name from the 'Occurrence' containment reference list.

Parameters:
unqualifiedName - The unqualified name of the CollaborationOccurrence to retrieve.
Returns:
The CollaborationOccurrence with the specified name, or null.
See Also:
getOccurrences()

createOccurrence

public CollaborationOccurrence createOccurrence(EClass eClass)
Creates a CollaborationOccurrence and appends it to the 'Occurrence' containment reference list.

Parameters:
eClass - The Ecore class of the CollaborationOccurrence to create.
Returns:
The new CollaborationOccurrence.
See Also:
getOccurrences()

allFeatures

public Set allFeatures()
A query based on the following OCL expression: member->select(oclIsKindOf(Feature))


validateNoCyclesInGeneralization

public boolean validateNoCyclesInGeneralization(DiagnosticChain diagnostics,
                                                Map context)
An invariant constraint based on the following OCL expression: not self.allParents()->includes(self)


validateSpecializeType

public boolean validateSpecializeType(DiagnosticChain diagnostics,
                                      Map context)
An invariant constraint based on the following OCL expression: self.parents()->forAll(c | self.maySpecializeType(c))


validateInheritedMember

public boolean validateInheritedMember(DiagnosticChain diagnostics,
                                       Map context)
An invariant constraint based on the following OCL expression: self.inheritedMember->includesAll(self.inherit(self.parents()->collect(p | p.inheritableMembers(self)))


inheritedMember

public Set inheritedMember()
A query based on the following OCL expression: self.inherit(self.parents()->collect(p | p.inheritableMembers(self))


parents

public Set parents()
A query based on the following OCL expression: generalization.general


allParents

public Set allParents()
A query based on the following OCL expression: self.parents()->union(self.parents()->collect(p | p.allParents())


inheritableMembers

public Set inheritableMembers(Classifier c)
A query based on the following OCL expression: member->select(m | c.hasVisibilityOf(m))


hasVisibilityOf

public boolean hasVisibilityOf(NamedElement n)
A query based on the following OCL expression: true


inherit

public Set inherit(Set inhs)
A query based on the following OCL expression: inhs


maySpecializeType

public boolean maySpecializeType(Classifier c)
A query based on the following OCL expression: self.oclIsKindOf(c.oclType)


general

public Set general()
A query based on the following OCL expression: self.parents()


validateGeneralEqualsParents

public boolean validateGeneralEqualsParents(DiagnosticChain diagnostics,
                                            Map context)
An invariant constraint based on the following OCL expression: general = self.parents()


conformsTo

public boolean conformsTo(Classifier other)
A query based on the following OCL expression: (self=other) or (self.allParents()->includes(other))


getMembers

public EList getMembers()

Specified by:
getMembers in interface Namespace
Returns:
the value of the 'Member' reference list.
See Also:
UML2Package.getNamespace_Member()

getOwnedElements

public EList getOwnedElements()

Specified by:
getOwnedElements in interface Namespace

getRedefinedElements

public EList getRedefinedElements()

Specified by:
getRedefinedElements in interface RedefinableElement

getClientDependencies

public EList getClientDependencies()

Specified by:
getClientDependencies in interface NamedElement
Returns:
the value of the 'Client Dependency' reference list.
See Also:
UML2Package.getNamedElement_ClientDependency(), Dependency.getClients()

getOwnedMembers

public EList getOwnedMembers()

Specified by:
getOwnedMembers in interface Namespace

createGeneralization

public Generalization createGeneralization(Classifier generalClassifier)
Creates a generalization between this classifier and the specified general classifier.

Parameters:
generalClassifier - The classifier to which to create a generalization.
Returns:
The new generalization.
Throws:
IllegalArgumentException - If this classifier is already a direct or indirect parent or child of the general classifier.

getUsedInterfaces

public Set getUsedInterfaces()
Retrieves the interfaces on which this classifier has a usage dependency.

Returns:
The interfaces used by this classifier.

Copyright 2003, 2004 IBM Corporation and others.
All Rights Reserved.