org.eclipse.uml2.uml
Interface ClassifierTemplateParameter

All Superinterfaces:
Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier, TemplateParameter

public interface ClassifierTemplateParameter
extends TemplateParameter

A representation of the model object 'Classifier Template Parameter'. A ClassifierTemplateParameter exposes a Classifier as a formal template parameter.

From package UML::Classification.

The following features are supported:

See Also:
UMLPackage.getClassifierTemplateParameter()

Method Summary
 Classifier getConstrainingClassifier(java.lang.String name)
          Retrieves the first Classifier with the specified 'Name' from the 'Constraining Classifier' reference list
 Classifier getConstrainingClassifier(java.lang.String name, boolean ignoreCase, org.eclipse.emf.ecore.EClass eClass)
          Retrieves the first Classifier with the specified 'Name' from the 'Constraining Classifier' reference list
 org.eclipse.emf.common.util.EList<Classifier> getConstrainingClassifiers()
          Returns the value of the 'Constraining Classifier' reference list.
 boolean isAllowSubstitutable()
          Returns the value of the 'Allow Substitutable' attribute.
 void setAllowSubstitutable(boolean value)
          Sets the value of the 'Allow Substitutable' attribute
 boolean validateActualIsClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The argument to a ClassifierTemplateParameter is a Classifier.
 boolean validateConstrainingClassifiersConstrainArgs(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If there are any constrainingClassifiers, then every argument must be the same as or a specialization of them, or if allowSubstitutable is true, then it can also be substitutable.
 boolean validateConstrainingClassifiersConstrainParameteredElement(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If there are any constrainingClassifiers, then the parameteredElement must be the same as or a specialization of them, or if allowSubstitutable is true, then it can also be substitutable.
 boolean validateHasConstrainingClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If allowSubstitutable is true, then there must be a constrainingClassifier.
 boolean validateMatchingAbstract(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          If the parameteredElement is not abstract, then the Classifier used as an argument shall not be abstract.
 boolean validateParameteredElementNoFeatures(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The parameteredElement has no direct features, and if constrainedElement is empty it has no generalizations.
 
Methods inherited from interface org.eclipse.uml2.uml.TemplateParameter
createOwnedDefault, createOwnedParameteredElement, getDefault, getOwnedDefault, getOwnedParameteredElement, getParameteredElement, getSignature, setDefault, setOwnedDefault, setOwnedParameteredElement, setParameteredElement, setSignature, validateMustBeCompatible
 
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, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

isAllowSubstitutable

boolean isAllowSubstitutable()
Returns the value of the 'Allow Substitutable' attribute. The default value is "true". Constrains the required relationship between an actual parameter and the parameteredElement for this formal parameter.

From package UML::Classification.

Returns:
the value of the 'Allow Substitutable' attribute.
See Also:
setAllowSubstitutable(boolean), UMLPackage.getClassifierTemplateParameter_AllowSubstitutable()

setAllowSubstitutable

void setAllowSubstitutable(boolean value)
Sets the value of the 'Allow Substitutable' attribute.

Parameters:
value - the new value of the 'Allow Substitutable' attribute.
See Also:
isAllowSubstitutable()

getConstrainingClassifiers

org.eclipse.emf.common.util.EList<Classifier> getConstrainingClassifiers()
Returns the value of the 'Constraining Classifier' reference list. The list contents are of type Classifier. The classifiers that constrain the argument that can be used for the parameter. If the allowSubstitutable attribute is true, then any Classifier that is compatible with this constraining Classifier can be substituted; otherwise, it must be either this Classifier or one of its specializations. If this property is empty, there are no constraints on the Classifier that can be used as an argument.

From package UML::Classification.

Returns:
the value of the 'Constraining Classifier' reference list.
See Also:
UMLPackage.getClassifierTemplateParameter_ConstrainingClassifier()

getConstrainingClassifier

Classifier getConstrainingClassifier(java.lang.String name)
Retrieves the first Classifier with the specified 'Name' from the 'Constraining 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:
getConstrainingClassifiers()

getConstrainingClassifier

Classifier getConstrainingClassifier(java.lang.String name,
                                     boolean ignoreCase,
                                     org.eclipse.emf.ecore.EClass eClass)
Retrieves the first Classifier with the specified 'Name' from the 'Constraining 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:
getConstrainingClassifiers()

validateHasConstrainingClassifier

boolean validateHasConstrainingClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                          java.util.Map<java.lang.Object,java.lang.Object> context)
If allowSubstitutable is true, then there must be a constrainingClassifier. allowSubstitutable implies constrainingClassifier->notEmpty()

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateParameteredElementNoFeatures

boolean validateParameteredElementNoFeatures(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                             java.util.Map<java.lang.Object,java.lang.Object> context)
The parameteredElement has no direct features, and if constrainedElement is empty it has no generalizations. parameteredElement.feature->isEmpty() and (constrainingClassifier->isEmpty() implies parameteredElement.allParents()->isEmpty())

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateMatchingAbstract

boolean validateMatchingAbstract(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                 java.util.Map<java.lang.Object,java.lang.Object> context)
If the parameteredElement is not abstract, then the Classifier used as an argument shall not be abstract. (not parameteredElement.isAbstract) implies templateParameterSubstitution.actual->forAll(a | not a.oclAsType(Classifier).isAbstract)

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateActualIsClassifier

boolean validateActualIsClassifier(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                   java.util.Map<java.lang.Object,java.lang.Object> context)
The argument to a ClassifierTemplateParameter is a Classifier. templateParameterSubstitution.actual->forAll(a | a.oclIsKindOf(Classifier))

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateConstrainingClassifiersConstrainArgs

boolean validateConstrainingClassifiersConstrainArgs(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                     java.util.Map<java.lang.Object,java.lang.Object> context)
If there are any constrainingClassifiers, then every argument must be the same as or a specialization of them, or if allowSubstitutable is true, then it can also be substitutable. templateParameterSubstitution.actual->forAll( a | let arg : Classifier = a.oclAsType(Classifier) in constrainingClassifier->forAll( cc | arg = cc or arg.conformsTo(cc) or (allowSubstitutable and arg.isSubstitutableFor(cc)) ) )

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

validateConstrainingClassifiersConstrainParameteredElement

boolean validateConstrainingClassifiersConstrainParameteredElement(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                                                   java.util.Map<java.lang.Object,java.lang.Object> context)
If there are any constrainingClassifiers, then the parameteredElement must be the same as or a specialization of them, or if allowSubstitutable is true, then it can also be substitutable. constrainingClassifier->forAll( cc | parameteredElement = cc or parameteredElement.conformsTo(cc) or (allowSubstitutable and parameteredElement.isSubstitutableFor(cc)) )

Parameters:
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.