Adding template parameters to classes and collaborations

In UML models, a template parameter is a placeholder that another model element must fill when a new model element is generated from the template. You can add template parameters to classes to create template classes, and to collaborations to create patterns.

Before you begin

You can use template parameters to create general definitions of particular types of templates. For example, when you add template parameters to a class, it becomes a template class, which is sometimes called a parameterized class. If you use a template class as a general pattern, you can create a group of classes that use template parameters to define more specific behavior.

You must have a model that contains at least one class or collaboration open in the Modeling perspective.

Procedure

To add a template parameter to a class or collaboration, in the Project Explorer view, right-click a class or collaboration, click Add UML > Template Parameter, and then click the type of parameter.

Feedback