This basic code is known as the implementation model and includes a pattern library, the pattern definition, and pattern parameters. The framework also provides commonly used functions for the author to use by implementing the interfaces and extending the abstract classes defined in a pattern service. The basic default code is added when the pattern author creates the pattern library plug-in project. The pattern library, essential to pattern design, is created during this process.
The author completes the implementation model by adding one or more patterns and their template parameters to the library. This is accomplished by using GUI-based tools. The implementation model is regenerated each time the pattern author modifies the library model. Patterns are represented by Java classes and nested within these classes is a class for each parameter. Each parameter has empty expansion methods to address the addition, replacement and removal of an argument.
Parameter dependencies are used to control the expansion sequence when one parameter requires the values of another to expand. A dependency class is nested in the appropriate parameter class and includes three update methods. Code added to the update methods addresses conditions that may occur in pattern application: adding, removing, or maintaining an argument.
The expansion and update methods are known as hot spots.
The pattern author supplies the appropriate code in the hot
spots that will invoke the required behaviors when the pattern
is applied. Hot spots are clearly annotated in the default Java code with TODO comments. The
default code is marked with Javadoc @generated tags. The @generated
tags must be removed if the default code is modified or the modifications
are overwritten when the implementation model is regenerated.