Pattern expansion

To implement the intended pattern behaviors when the pattern is applied, pattern expansion code is provided by the pattern author for each parameter and is invoked when that parameter is bound. Thus, expansion occurs on an incremental basis.

As arguments are specified by the pattern applier, the results of bound and expanded argument are immediately observable in the target elements. Because parameters are expanded independently, the pattern applier can select to apply only the pattern parameters that are solutions to the current design problem. More than one instance of the pattern can exist at one time and patterns can be applied multiple times to target elements.

An exception to parameter independence is the use of dependencies between parameters. This applies to parameters that require the values from another parameter for expansion. Pattern dependencies are not UML 2.0 dependencies. When the dependency Client or Supplier property is set in the pattern model, empty update methods are generated in the pattern. These methods are ready for the pattern author to code the expansion sequence based on the inter parameter's requirements.

Related concepts
Pattern framework
Pattern definitions
Pattern project contents
Pattern instantiations
Pattern types
Related tasks
Defining expansion methods
Defining update methods
Adding dependencies to parameters
Regenerating source code
Regenerating pattern definitions
Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.