Interface Classifier

    • Method Detail

      • isAbstract

        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:
        setIsAbstract(boolean), UMLPackage.getClassifier_IsAbstract()
      • setIsAbstract

        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()
      • getFeature

        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:
        getFeatures()
      • getFeature

        Feature getFeature​(String name,
                           boolean ignoreCase,
                           org.eclipse.emf.ecore.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:
        getFeatures()
      • getInheritedMember

        NamedElement getInheritedMember​(String name,
                                        boolean ignoreCase,
                                        org.eclipse.emf.ecore.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:
        getInheritedMembers()
      • getRedefinedClassifier

        Classifier getRedefinedClassifier​(String name,
                                          boolean ignoreCase,
                                          org.eclipse.emf.ecore.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:
        getRedefinedClassifiers()
      • getGenerals

        MDWEList<Classifier> 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

        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:
        getGenerals()
      • getGeneral

        Classifier getGeneral​(String name,
                              boolean ignoreCase,
                              org.eclipse.emf.ecore.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:
        getGenerals()
      • getOwnedUseCases

        MDWEList<UseCase> 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

        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:
        getOwnedUseCases()
      • getOwnedUseCase

        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:
        getOwnedUseCases()
      • getOwnedUseCase

        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:
        getOwnedUseCases()
      • getUseCase

        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:
        getUseCases()
      • getUseCase

        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:
        getUseCases()
      • getSubstitution

        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:
        getSubstitutions()
      • getAttributes

        MDWEList<Property> 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

        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:
        getAttributes()
      • getAttribute

        Property getAttribute​(String name,
                              Type type,
                              boolean ignoreCase,
                              org.eclipse.emf.ecore.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:
        getAttributes()
      • validateNoCyclesInGeneralization

        boolean validateNoCyclesInGeneralization​(org.eclipse.emf.common.util.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

        boolean validateSpecializeType​(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                       Map context)
        A classifier may only specialize classifiers of a valid type. self.parents()->forAll(c | self.maySpecializeType(c))
      • validateGeneralizationHierarchies

        boolean validateGeneralizationHierarchies​(org.eclipse.emf.common.util.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

        boolean validateMapsToGeneralizationSet​(org.eclipse.emf.common.util.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
      • getAllAttributes

        MDWEList<Property> getAllAttributes()
        Retrieves all the attributes of this classifier, including those inherited from its parents.
      • getOperations

        MDWEList<Operation> getOperations()
        Retrieves the operations of this classifier.
      • getAllOperations

        MDWEList<Operation> getAllOperations()
        Retrieves all the operations of this classifier, including those inherited from its parents.
      • getOperation

        Operation getOperation​(String name,
                               MDWEList<String> parameterNames,
                               MDWEList<? extends Type> parameterTypes)
        Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier.
      • getOperation

        Operation getOperation​(String name,
                               MDWEList<String> parameterNames,
                               MDWEList<? extends Type> parameterTypes,
                               boolean ignoreCase)
        Retrieves the first operation with the specified name, parameter names, and parameter types from this classifier, ignoring case if indicated.
      • getUsedInterfaces

        MDWEList<Interface> getUsedInterfaces()
        Retrieves the interfaces on which this classifier has a usage dependency.
      • getAllUsedInterfaces

        MDWEList<Interface> getAllUsedInterfaces()
        Retrieves all the interfaces on which this classifier or any of its parents has a usage dependency.
      • maySpecializeType

        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

        MDWEList<Feature> 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

        MDWEList<Classifier> parents()
        The query parents() gives all of the immediate ancestors of a generalized Classifier. result = generalization.general
      • inheritableMembers

        MDWEList<NamedElement> 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

        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

        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

        MDWEList<NamedElement> inherit​(MDWEList<NamedElement> 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

        MDWEList<Classifier> 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())
      • isFinalSpecialization

        boolean isFinalSpecialization()
        Returns the 'isFinalSpecialization' value for the current Classifier.
        for UML 2.3 or higher
        Returns:
        boolean
        Since:
        3.9.0
      • setIsFinalSpecialization

        void setIsFinalSpecialization​(boolean isFinalSpecialization)
        Set the 'isFinalSpecialization' value for the current Classifier.
        for UML 2.3 or higher
        Parameters:
        isFinalSpecialization - boolean value
        Since:
        3.9.0