Prev | Next |
Template Binding
Description
You create a Template Binding connector between a binding Class and a parameterized Class. You then define a binding expression on that connector. However, if the binding Class requires a Generalization, Realization or Association relationship with the parameterized Class, you can define the binding expression on that relationship instead.
You can create a Template Binding connector using:
- The 'Template Binding' icon on the 'Class Relationships' page of the Diagram Toolbox
- The Quick Linker arrow next to the source Class element
- The 'Templates' dialog for the binding Class element; here, you create the Template Binding relationship by clicking the under the 'Binding(s)' panel, specifying the connector type, and selecting the target parameterized Class from the 'Select <Item>' dialog
Each of these methods creates the connector itself. For the first two methods you then click on the connector to make it the focus of the Properties window, on which you select the 'Binding' tab to define parameter substitutions as the binding expression. The third method takes you to the same tab on the 'Properties' dialog automatically.
Toolbox icon
Learn more
OMG UML Specification:
The OMG Unified Modeling Language specification, (v2.5.1, p.24) states:
A template is a parameterized element ... used to generate other model elements using TemplateBinding relationships. The template parameters for the template signature specify the formal parameters that will be substituted by actual parameters (or the default) in a binding.