When you add a parameter to a pattern in the Pattern
Authoring view, a parameter class with two expansion methods is
added to the pattern implementation model.
Expansion methods and the optional update methods are known as hot
spots. You add Java™ code to the hot spots to dictate the
pattern behavior when an argument value is added to or removed from a parameter.
The following methods show the expansion methods:


To assist you with your code design, refer
to the resources available in the pattern online help for the pattern framework
and other references. To open the references, click , expand either API
reference or Extention Points Reference and
then click one of the Patterns topics.
To add
expansion code:
- In the Pattern Authoring view, double-click
the parameter to locate the parameter code in the Java editor.
- Replace the TODO comments in both methods with the code that performs
the required behavior when an argument is added to or removed from the parameter
in the pattern instance.
- Remove the @generated tag from any method that you modify to prohibit
the pattern authoring tool from regenerating and removing your code.
Note: To better understand pattern behavior, you can practice applying
patterns by using the sample patterns. You can load the sample patterns by
clicking , expanding Technology samples, expanding Patterns,
and clicking Patterns to apply. In the Patterns
to apply topic, click Import the sample.
To better understand how to create patterns, you can import the example patterns
by clicking , in the New window,
expand Examples, expand UML Modeler Plug-ins, and click Pattern
Library Examples.