org.eclipse.uml2.uml
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, FunctionBehavior, InformationItem, Interaction, Interface, Node, OpaqueBehavior, PrimitiveType, ProtocolStateMachine, Signal, StateMachine, Stereotype, StructuredClassifier, UseCase

public interface Classifier
extends Namespace, RedefinableElement, Type, TemplateableElement

A representation of the model object 'Classifier'. A classifier is a classification of instances - it describes a set of instances that have features in common. A classifier can specify a generalization hierarchy by referencing its general classifiers. A classifier has the capability to own collaboration uses. These collaboration uses link a collaboration with the classifier to give a description of the workings of the classifier. A classifier has the capability to own use cases. Although the owning classifier typically represents the subject to which the owned use cases apply, this is not necessarily the case. In principle, the same use case can be applied to multiple subjects, as identified by the subject association role of a use case. 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.

The following features are supported:

See Also:
UMLPackage.getClassifier()

Field Summary
 
Fields inherited from interface org.eclipse.uml2.uml.NamedElement
SEPARATOR
 
Method Summary
 EList allFeatures()
           The query allFeatures() gives all of the features in the namespace of the classifier.
 EList allParents()
           The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier.
 boolean conformsTo(Classifier other)
           The query conformsTo() gives true for a classifier that defines a type that conforms to another.
 CollaborationUse createCollaborationUse(String name)
          Creates a new CollaborationUse, with the specified 'Name', and appends it to the 'Collaboration Use' containment reference list
 Generalization createGeneralization(Classifier general)
          Creates a new Generalization, with the specified 'General', and appends it to the 'Generalization' containment reference list
 UseCase createOwnedUseCase(String name)
          Creates a new UseCase, with the specified 'Name', and appends it to the 'Owned Use Case' containment reference list
 CollaborationUse createRepresentation(String name)
          Creates a new CollaborationUse,with the specified 'Name', and sets the 'Representation' reference
 Substitution createSubstitution(String name, Classifier contract)
          Creates a new Substitution, with the specified 'Name', and 'Contract', and appends it to the 'Substitution' containment reference list
 EList getAllAttributes()
           Retrieves all the attributes of this classifier, including those inherited from its parents
 EList getAllOperations()
           Retrieves all the operations of this classifier, including those inherited from its parents
 EList getAllUsedInterfaces()
           Retrieves all the interfaces on which this classifier or any of its parents has a usage dependency
 Property getAttribute(String name, Type type)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Attribute' reference list
 Property getAttribute(String name, Type type, boolean ignoreCase, EClass eClass)
          Retrieves the first Property with the specified 'Name', and 'Type' from the 'Attribute' reference list
 EList getAttributes()
          Returns the value of the 'Attribute' reference list.
 CollaborationUse getCollaborationUse(String name)
          Retrieves the first CollaborationUse with the specified 'Name' from the 'Collaboration Use' containment reference list
 CollaborationUse getCollaborationUse(String name, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first CollaborationUse with the specified 'Name' from the 'Collaboration Use' containment reference list
 EList getCollaborationUses()
          Returns the value of the 'Collaboration Use' containment reference list.
 Feature getFeature(String name)
          Retrieves the first Feature with the specified 'Name' from the 'Feature' reference list
 Feature getFeature(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first Feature with the specified 'Name' from the 'Feature' reference list
 EList getFeatures()
          Returns the value of the 'Feature' reference list.
 Classifier getGeneral(String name)
          Retrieves the first Classifier with the specified 'Name' from the 'General' reference list
 Classifier getGeneral(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first Classifier with the specified 'Name' from the 'General' reference list
 Generalization getGeneralization(Classifier general)
          Retrieves the first Generalization with the specified 'General' from the 'Generalization' containment reference list
 Generalization getGeneralization(Classifier general, boolean createOnDemand)
          Retrieves the first Generalization with the specified 'General' from the 'Generalization' containment 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 name)
          Retrieves the first NamedElement with the specified 'Name' from the 'Inherited Member' reference list
 NamedElement getInheritedMember(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first NamedElement with the specified 'Name' from the 'Inherited Member' reference list
 EList getInheritedMembers()
          Returns the value of the 'Inherited Member' reference list.
 Operation getOperation(String name, EList parameterNames, EList parameterTypes)
           Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier
 Operation getOperation(String name, EList parameterNames, EList parameterTypes, boolean ignoreCase)
           Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier, ignoring case if indicated
 EList getOperations()
           Retrieves the operations of this classifier
 UseCase getOwnedUseCase(String name)
          Retrieves the first UseCase with the specified 'Name' from the 'Owned Use Case' containment reference list
 UseCase getOwnedUseCase(String name, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first 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 name)
          Retrieves the first GeneralizationSet with the specified 'Name' from the 'Powertype Extent' reference list
 GeneralizationSet getPowertypeExtent(String name, boolean ignoreCase)
          Retrieves the first 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 name)
          Retrieves the first Classifier with the specified 'Name' from the 'Redefined Classifier' reference list
 Classifier getRedefinedClassifier(String name, boolean ignoreCase, EClass eClass)
          Retrieves the first Classifier with the specified 'Name' from the 'Redefined Classifier' reference list
 EList getRedefinedClassifiers()
          Returns the value of the 'Redefined Classifier' reference list.
 CollaborationUse getRepresentation()
          Returns the value of the 'Representation' reference
 Substitution getSubstitution(String name, Classifier contract)
          Retrieves the first Substitution with the specified 'Name', and 'Contract' from the 'Substitution' containment reference list
 Substitution getSubstitution(String name, Classifier contract, boolean ignoreCase, boolean createOnDemand)
          Retrieves the first Substitution with the specified 'Name', and 'Contract' from the 'Substitution' containment reference list
 EList getSubstitutions()
          Returns the value of the 'Substitution' containment reference list.
 UseCase getUseCase(String name)
          Retrieves the first UseCase with the specified 'Name' from the 'Use Case' reference list
 UseCase getUseCase(String name, boolean ignoreCase)
          Retrieves the first UseCase with the specified 'Name' from the 'Use Case' reference list
 EList getUseCases()
          Returns the value of the 'Use Case' reference list.
 EList getUsedInterfaces()
           Retrieves the interfaces on which this classifier has a usage dependency
 boolean hasVisibilityOf(NamedElement n)
           The query hasVisibilityOf() determines whether a named element is visible in the classifier.
 EList inherit(EList inhs)
           The inherit operation is overridden to exclude redefined properties.
 EList inheritableMembers(Classifier c)
           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.
 boolean isAbstract()
          Returns the value of the 'Is Abstract' attribute.
 boolean maySpecializeType(Classifier c)
           The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type.
 EList parents()
           The query parents() gives all of the immediate ancestors of a generalized Classifier.
 void setIsAbstract(boolean value)
          Sets the value of the 'Is Abstract' attribute
 void setRepresentation(CollaborationUse value)
          Sets the value of the 'Representation' reference
 boolean validateGeneralizationHierarchies(DiagnosticChain diagnostics, Map context)
           Generalization hierarchies must be directed and acyclical.
 boolean validateMapsToGeneralizationSet(DiagnosticChain diagnostics, Map context)
           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.
 boolean validateNoCyclesInGeneralization(DiagnosticChain diagnostics, Map context)
           Generalization hierarchies must be directed and acyclical.
 boolean validateSpecializeType(DiagnosticChain diagnostics, Map context)
           A classifier may only specialize classifiers of a valid type.
 
Methods inherited from interface org.eclipse.uml2.uml.Namespace
createElementImport, createElementImport, createOwnedRule, createOwnedRule, createPackageImport, createPackageImport, excludeCollisions, getElementImport, getElementImport, getElementImports, getImportedElements, getImportedMember, getImportedMember, getImportedMembers, getImportedPackages, getMember, getMember, getMembers, getNamesOfMember, getOwnedMember, getOwnedMember, getOwnedMembers, getOwnedRule, getOwnedRule, getOwnedRules, getPackageImport, getPackageImport, getPackageImports, importMembers, membersAreDistinguishable, validateMembersDistinguishable
 
Methods inherited from interface org.eclipse.uml2.uml.NamedElement
allNamespaces, allOwningPackages, createDependency, createNameExpression, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership
 
Methods inherited from interface org.eclipse.uml2.uml.Element
addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, 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.uml.RedefinableElement
getRedefinedElement, getRedefinedElement, getRedefinedElements, getRedefinitionContext, getRedefinitionContext, getRedefinitionContexts, isConsistentWith, isLeaf, isRedefinitionContextValid, setIsLeaf, validateRedefinitionConsistent, validateRedefinitionContextValid
 
Methods inherited from interface org.eclipse.uml2.uml.Type
conformsTo, createAssociation, getAssociations, getPackage, setPackage
 
Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter
 
Methods inherited from interface org.eclipse.uml2.uml.TemplateableElement
createOwnedTemplateSignature, createOwnedTemplateSignature, createTemplateBinding, getOwnedTemplateSignature, getTemplateBinding, getTemplateBinding, getTemplateBindings, isTemplate, parameterableElements, setOwnedTemplateSignature
 

Method Detail

isAbstract

public boolean isAbstract()
Returns the value of the 'Is Abstract' attribute. The default value is "false". 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.

Returns:
the value of the 'Is Abstract' attribute.
See Also:
Classifier.setIsAbstract(boolean), UMLPackage.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:
Classifier.isAbstract()

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'. Specifies the Generalization relationships for this Classifier. These Generalizations navigaten to more general classifiers in the generalization hierarchy.

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

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'. Designates the GeneralizationSet of which the associated Classifier is a power type.

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

getPowertypeExtent

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

Parameters:
name - The 'Name' of the GeneralizationSet to retrieve, or null.
Returns:
The first GeneralizationSet with the specified 'Name', or null.
See Also:
Classifier.getPowertypeExtents()

getPowertypeExtent

public GeneralizationSet getPowertypeExtent(String name,
                                            boolean ignoreCase)
Retrieves the first GeneralizationSet with the specified 'Name' from the 'Powertype Extent' reference list.

Parameters:
name - The 'Name' of the GeneralizationSet to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first GeneralizationSet with the specified 'Name', or null.
See Also:
Classifier.getPowertypeExtents()

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'. Note that there may be members of the Classifier that are of the type Feature but are not included in this association, e.g. inherited features. Specifies each feature defined in the classifier.

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

getFeature

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

Parameters:
name - The 'Name' of the Feature to retrieve, or null.
Returns:
The first Feature with the specified 'Name', or null.
See Also:
Classifier.getFeatures()

getFeature

public Feature getFeature(String name,
                          boolean ignoreCase,
                          EClass eClass)
Retrieves the first Feature with the specified 'Name' from the 'Feature' reference list.

Parameters:
name - The 'Name' of the Feature to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Feature to retrieve, or null.
Returns:
The first Feature with the specified 'Name', or null.
See Also:
Classifier.getFeatures()

getInheritedMembers

public EList getInheritedMembers()
Returns the value of the 'Inherited Member' reference list. The list contents are of type NamedElement. Specifies all elements inherited by this classifier from the general classifiers.

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

getInheritedMember

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

Parameters:
name - The 'Name' of the NamedElement to retrieve, or null.
Returns:
The first NamedElement with the specified 'Name', or null.
See Also:
Classifier.getInheritedMembers()

getInheritedMember

public NamedElement getInheritedMember(String name,
                                       boolean ignoreCase,
                                       EClass eClass)
Retrieves the first NamedElement with the specified 'Name' from the 'Inherited Member' reference list.

Parameters:
name - The 'Name' of the NamedElement to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the NamedElement to retrieve, or null.
Returns:
The first NamedElement with the specified 'Name', or null.
See Also:
Classifier.getInheritedMembers()

getRedefinedClassifiers

public EList getRedefinedClassifiers()
Returns the value of the 'Redefined Classifier' reference list. The list contents are of type Classifier. References the Classifiers that are redefined by this Classifier.

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

getRedefinedClassifier

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

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

getRedefinedClassifier

public Classifier getRedefinedClassifier(String name,
                                         boolean ignoreCase,
                                         EClass eClass)
Retrieves the first Classifier with the specified 'Name' from the 'Redefined Classifier' reference list.

Parameters:
name - The 'Name' of the Classifier to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Classifier to retrieve, or null.
Returns:
The first Classifier with the specified 'Name', or null.
See Also:
Classifier.getRedefinedClassifiers()

getGenerals

public EList getGenerals()
Returns the value of the 'General' reference list. The list contents are of type Classifier. References the general classifier in the Generalization relationship. Specifies the general Classifiers for this Classifier.

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

getGeneral

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

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

getGeneral

public Classifier getGeneral(String name,
                             boolean ignoreCase,
                             EClass eClass)
Retrieves the first Classifier with the specified 'Name' from the 'General' reference list.

Parameters:
name - The 'Name' of the Classifier to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Classifier to retrieve, or null.
Returns:
The first Classifier with the specified 'Name', or null.
See Also:
Classifier.getGenerals()

getOwnedUseCases

public EList getOwnedUseCases()
Returns the value of the 'Owned Use Case' containment reference list. The list contents are of type UseCase. References the use cases owned by this classifier.

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

createOwnedUseCase

public UseCase createOwnedUseCase(String name)
Creates a new UseCase, with the specified 'Name', and appends it to the 'Owned Use Case' containment reference list.

Parameters:
name - The 'Name' for the new UseCase, or null.
Returns:
The new UseCase.
See Also:
Classifier.getOwnedUseCases()

getOwnedUseCase

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

Parameters:
name - The 'Name' of the UseCase to retrieve, or null.
Returns:
The first UseCase with the specified 'Name', or null.
See Also:
Classifier.getOwnedUseCases()

getOwnedUseCase

public UseCase getOwnedUseCase(String name,
                               boolean ignoreCase,
                               boolean createOnDemand)
Retrieves the first UseCase with the specified 'Name' from the 'Owned Use Case' containment reference list.

Parameters:
name - The 'Name' of the UseCase to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a UseCase on demand if not found.
Returns:
The first UseCase with the specified 'Name', or null.
See Also:
Classifier.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'. The set of use cases for which this Classifier is the subject.

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

getUseCase

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

Parameters:
name - The 'Name' of the UseCase to retrieve, or null.
Returns:
The first UseCase with the specified 'Name', or null.
See Also:
Classifier.getUseCases()

getUseCase

public UseCase getUseCase(String name,
                          boolean ignoreCase)
Retrieves the first UseCase with the specified 'Name' from the 'Use Case' reference list.

Parameters:
name - The 'Name' of the UseCase to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
Returns:
The first UseCase with the specified 'Name', or null.
See Also:
Classifier.getUseCases()

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'. References the substitutions that are owned by this Classifier.

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

createSubstitution

public Substitution createSubstitution(String name,
                                       Classifier contract)
Creates a new Substitution, with the specified 'Name', and 'Contract', and appends it to the 'Substitution' containment reference list.

Parameters:
name - The 'Name' for the new Substitution, or null.
contract - The 'Contract' for the new Substitution, or null.
Returns:
The new Substitution.
See Also:
Classifier.getSubstitutions()

getSubstitution

public Substitution getSubstitution(String name,
                                    Classifier contract)
Retrieves the first Substitution with the specified 'Name', and 'Contract' from the 'Substitution' containment reference list.

Parameters:
name - The 'Name' of the Substitution to retrieve, or null.
contract - The 'Contract' of the Substitution to retrieve, or null.
Returns:
The first Substitution with the specified 'Name', and 'Contract', or null.
See Also:
Classifier.getSubstitutions()

getSubstitution

public Substitution getSubstitution(String name,
                                    Classifier contract,
                                    boolean ignoreCase,
                                    boolean createOnDemand)
Retrieves the first Substitution with the specified 'Name', and 'Contract' from the 'Substitution' containment reference list.

Parameters:
name - The 'Name' of the Substitution to retrieve, or null.
contract - The 'Contract' of the Substitution to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a Substitution on demand if not found.
Returns:
The first Substitution with the specified 'Name', and 'Contract', or null.
See Also:
Classifier.getSubstitutions()

getAttributes

public EList getAttributes()
Returns the value of the 'Attribute' reference list. The list contents are of type Property. Refers to all of the Properties that are direct (i.e. not inherited or imported) attributes of the classifier.

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

getAttribute

public Property getAttribute(String name,
                             Type type)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Attribute' reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Classifier.getAttributes()

getAttribute

public Property getAttribute(String name,
                             Type type,
                             boolean ignoreCase,
                             EClass eClass)
Retrieves the first Property with the specified 'Name', and 'Type' from the 'Attribute' reference list.

Parameters:
name - The 'Name' of the Property to retrieve, or null.
type - The 'Type' of the Property to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
eClass - The Ecore class of the Property to retrieve, or null.
Returns:
The first Property with the specified 'Name', and 'Type', or null.
See Also:
Classifier.getAttributes()

getRepresentation

public CollaborationUse getRepresentation()
Returns the value of the 'Representation' reference. References a collaboration use which indicates the collaboration that represents this classifier.

Returns:
the value of the 'Representation' reference.
See Also:
Classifier.setRepresentation(CollaborationUse), UMLPackage.getClassifier_Representation()

setRepresentation

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

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

createRepresentation

public CollaborationUse createRepresentation(String name)
Creates a new CollaborationUse,with the specified 'Name', and sets the 'Representation' reference.

Parameters:
name - The 'Name' for the new CollaborationUse, or null.
Returns:
The new CollaborationUse.
See Also:
Classifier.getRepresentation()

getCollaborationUses

public EList getCollaborationUses()
Returns the value of the 'Collaboration Use' containment reference list. The list contents are of type CollaborationUse. References the collaboration uses owned by the classifier.

Returns:
the value of the 'Collaboration Use' containment reference list.
See Also:
UMLPackage.getClassifier_CollaborationUse()

createCollaborationUse

public CollaborationUse createCollaborationUse(String name)
Creates a new CollaborationUse, with the specified 'Name', and appends it to the 'Collaboration Use' containment reference list.

Parameters:
name - The 'Name' for the new CollaborationUse, or null.
Returns:
The new CollaborationUse.
See Also:
Classifier.getCollaborationUses()

getCollaborationUse

public CollaborationUse getCollaborationUse(String name)
Retrieves the first CollaborationUse with the specified 'Name' from the 'Collaboration Use' containment reference list.

Parameters:
name - The 'Name' of the CollaborationUse to retrieve, or null.
Returns:
The first CollaborationUse with the specified 'Name', or null.
See Also:
Classifier.getCollaborationUses()

getCollaborationUse

public CollaborationUse getCollaborationUse(String name,
                                            boolean ignoreCase,
                                            boolean createOnDemand)
Retrieves the first CollaborationUse with the specified 'Name' from the 'Collaboration Use' containment reference list.

Parameters:
name - The 'Name' of the CollaborationUse to retrieve, or null.
ignoreCase - Whether to ignore case in String comparisons.
createOnDemand - Whether to create a CollaborationUse on demand if not found.
Returns:
The first CollaborationUse with the specified 'Name', or null.
See Also:
Classifier.getCollaborationUses()

validateNoCyclesInGeneralization

public boolean validateNoCyclesInGeneralization(DiagnosticChain diagnostics,
                                                Map context)
Generalization hierarchies must be directed and acyclical. A classifier can not be both a transitively general and transitively specific classifier of the same classifier. not self.allParents()->includes(self)


validateSpecializeType

public boolean validateSpecializeType(DiagnosticChain diagnostics,
                                      Map context)
A classifier may only specialize classifiers of a valid type. self.parents()->forAll(c | self.maySpecializeType(c))


validateGeneralizationHierarchies

public boolean validateGeneralizationHierarchies(DiagnosticChain diagnostics,
                                                 Map context)
Generalization hierarchies must be directed and acyclical. A classifier can not be both a transitively general and transitively specific classifier of the same classifier. not self.allParents()->includes(self)


validateMapsToGeneralizationSet

public boolean validateMapsToGeneralizationSet(DiagnosticChain diagnostics,
                                               Map context)
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. true


createGeneralization

public Generalization createGeneralization(Classifier general)
Creates a new Generalization, with the specified 'General', and appends it to the 'Generalization' containment reference list.

Parameters:
general - The 'General' for the new Generalization, or null.
Returns:
The new Generalization.
See Also:
Classifier.getGeneralizations()

getGeneralization

public Generalization getGeneralization(Classifier general)
Retrieves the first Generalization with the specified 'General' from the 'Generalization' containment reference list.

Parameters:
general - The 'General' of the Generalization to retrieve, or null.
Returns:
The first Generalization with the specified 'General', or null.
See Also:
Classifier.getGeneralizations()

getGeneralization

public Generalization getGeneralization(Classifier general,
                                        boolean createOnDemand)
Retrieves the first Generalization with the specified 'General' from the 'Generalization' containment reference list.

Parameters:
general - The 'General' of the Generalization to retrieve, or null.
createOnDemand - Whether to create a Generalization on demand if not found.
Returns:
The first Generalization with the specified 'General', or null.
See Also:
Classifier.getGeneralizations()

getAllAttributes

public EList getAllAttributes()
Retrieves all the attributes of this classifier, including those inherited from its parents.


getOperations

public EList getOperations()
Retrieves the operations of this classifier.


getAllOperations

public EList getAllOperations()
Retrieves all the operations of this classifier, including those inherited from its parents.


getOperation

public Operation getOperation(String name,
                              EList parameterNames,
                              EList parameterTypes)
Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier.


getOperation

public Operation getOperation(String name,
                              EList parameterNames,
                              EList parameterTypes,
                              boolean ignoreCase)
Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier, ignoring case if indicated.


getUsedInterfaces

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


getAllUsedInterfaces

public EList getAllUsedInterfaces()
Retrieves all the interfaces on which this classifier or any of its parents has a usage dependency.


maySpecializeType

public boolean maySpecializeType(Classifier c)
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. result = self.oclIsKindOf(c.oclType)


allFeatures

public EList allFeatures()
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. result = member->select(oclIsKindOf(Feature))


parents

public EList parents()
The query parents() gives all of the immediate ancestors of a generalized Classifier. result = generalization.general


inheritableMembers

public EList inheritableMembers(Classifier c)
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. c.allParents()->includes(self) result = member->select(m | c.hasVisibilityOf(m))


hasVisibilityOf

public boolean hasVisibilityOf(NamedElement n)
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. self.allParents()->collect(c | c.member)->includes(n) result = if (self.inheritedMember->includes(n)) then (n.visibility <> #private) else true


conformsTo

public boolean conformsTo(Classifier other)
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. result = (self=other) or (self.allParents()->includes(other))


inherit

public EList inherit(EList inhs)
The inherit operation is overridden to exclude redefined properties. 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. result = inhs


allParents

public EList allParents()
The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier. result = self.parents()->union(self.parents()->collect(p | p.allParents())


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