Previous | UML Classes | Table of Contents | UML Packages | Next |
•
ParameterableElement (from Templates) on page 647
•
ValueSpecification (from Kernel ) on page 140
(merge increment)
Description
ValueSpecification specializes ParameterableElement to specify that a value specification can be exposed as a formal template
parameter, and provided as an actual parameter in a binding of a template.
Attributes
No additional attributes
Associations
Issue 8593 - remove erroneous item
No additional associations
Constraints
No additional attributes
Additional Operations
[1] The query isCompatibleWith() determines if this parameterable element is compatible with the specified parameterable
element. By default parameterable element P is compatible with parameterable element Q if the kind of P is the same or a subtype
as the kind of Q. In addition, for ValueSpecification , the type must be conformant with the type of the specified parameterable
element.
Property::isCompatibleWith(p : ParameterableElement) : Boolean;isCompatibleWith = p->oclIsKindOf(self.oclType) and self.type.conformsTo(p.oclAsType(TypedElement ).type)
Semantics
The semantics is as in the general case. However, two aspects are worth commenting on. The first is to note that a value specification
may be an expression with substructure (i.e., an instance of the Expression class), in which case a template parameter may
expose a subexpression, not necessarily the whole expression itself. An example of this is given in
Figure 17.21 where the parametered element with label ‘n’ appears within the expression ‘n+1.’ Secondly, to note that by
extending NamedElement to optionally own a name expression, strings that are part of these named expressions may be parametered.
Notation
Issue 8593 -replace ‘instead of’ by ‘where’
Where a parametered ValueSpecification is used within an expression, the name of the parameter is used where any symbol (in
case of an Expression) or value (in case of a Literal) would otherwise appear.