Previous UML Classes Table of Contents UML Packages Next

17.5.8 ClassifierTemplateParameter


   A classifier template parameter exposes a classifier as a formal template parameter.



    TemplateParameter (from Templates) on page 653


   ClassifierTemplateParameter is a template parameter where the parametered element is a Classifier in its capacity of being a kind of ParameterableElement.


   • allowSubstitutable : Boolean[1] Constrains the required relationship between an actual parameter and the parameteredElement for this formal parameter. Default is true.


   • parameteredElement : Classifier[1] The parameterable classifier for this template parameter. Redefines TemplateParameter::parameteredElement.

Issue 8265 -add constrainingClassifier and defaultClassifier items


Issue 8265 -add new constraint

   [1] If allowSubstitutable is true, then there must be a constrainingClassifier

    allowSubstitutable implies constrainingClassifier->notEmpty()


   See Classifier for additional semantics related to the compatibility of actual and formal classifier parameters.


   A classifier template parameter extends the notation for a template parameter to include an optional type constraint: <classifier-template-parameter> ::= <parameter-name> [ ‘:‘ <parameter-kind> ] [‘>’ <constraint>] [‘=’ <default>] <constraint> ::= [‘{contract }’] <classifier-name> <default> ::= <classifier-name> The parameter-kind indicates the metaclass of the parametered element. It may be suppressed if it is ‘class’.

Issue 8528 - replace ‘allowsSubstitutable’ with ‘allowSubstitutable’

   The classifier-name of constraint designates the type constraint of the parameter, which reflects the general classifier for the parametered element for this template parameter. The ‘contract’ option indicates that allowSubstitutable is true, meaning the actual parameter must be a classifier that may substitute for the classifier designated by the classifier-name. A classifier template parameter with a constraint but without ‘contract’ indicates that the actual classifier must be a specialization of the classifier designated by the classifier-name.


   See Classifier.