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.
To add extension code:


To assist you with your code design, refer to the com.ibm.xtools.patterns.framework package's AbstractPatternParameter class. The AbstractPatternParameter class is the common implementation for a pattern parameter and is used indirectly through another subclass that further specializes this class. The abstract pattern parameter is the primary abstraction at runtime forming the backbone for an extension to take place through parameters, parameter dependencies and delegates. There are hot spots that can be overridden within this class. Most pattern implementations will implement some or most of these hot spots by overriding the hot spots methods. The most frequently implemented hot spots would be the expand and isValid methods. The hot spots methods are available for resolving alternatively specified parameter values and determining validity of these alternatively specified parameter values.
The PatternParameterValue class encapsulates all the information needed to qualify a value to the proper pattern parameter and pattern instance, plus provides nested subclasses that provide state-specific behavior corresponding to the state of the pattern parameter value. For example, when an expand method is called, the specific behavior provided by the pattern author is added to the expand method with the signature referencing the direct type of the pattern parameter value state, such as PatternParameterValue.ADDED, PatternParameterValue.REMOVED, PatternParameterValue.REPLACED, PatternParameterValue.MAINTAINED, PatternParameterValue.PROPOSED or PatternParameterValue.UNRESOLVED.