A more specific pattern
specializes a more general pattern if
the specific pattern's full description is a direct extension of the
more general pattern.
That is, the specific pattern must deal with a
specialisation of the problem the general pattern addresses, must have
a similar (but more specialised) solution structure, and must address
the same forces as the more general pattern, but may also address
additional forces. To make an analogy with object-oriented
programming, the
PatternUses relationship is similar to composition, while
the
PatternSpecializes relationship is similar to inheritance.
In the GOFBook
FactoryMethod specializes
TemplateMethod, because Factory
Methods are effectively Hook Methods which are used by subclasses to
specify the class of an object the Template Method in the superclass
will create.
The Specializes relationship can be used to identify abstract patterns by generalisation --- similar to the way inheritance can be used to identify
abstract classes. For example, in
the
DesignPatternsSmalltalkCompanion,
PatternSpecializes is used to introduce various Smalltalk versions of patterns. So
ChainOfResponsibility specializes
OoRecursion,
PluggableAdaptor specialises Adaptor, Bridge specializes
CollaboratingHierarchies, Flyweight specialises Sharable.
JamesNoble
RelationshipsBetweenPatterns