When a pattern is presented, it is given a pattern name. The structure section of the GoF pattern catalog provides a class diagram that shows the pattern's participating classes, interfaces, methods, associations, and attributes. The class, interface, method, association, and attribute names given in such a diagram, together with the pattern name, form a set of UML-F tags for the pattern. This is true regardless of whether we are discussing a pattern out of a pattern catalog or an application-specific pattern. The UML-F tags for a pattern take the form shown in the following table.
See Chapter 4 for further information.
Tag form | Summary |
---|---|
PatternName ClassName | The annotated class plays the role of the class given the name ClassName in the pattern named PatternName. |
PatternName InterfaceName | The annotated interface plays the role of the interface given the name InterfaceName in the pattern named PatternName. |
PatternName methodName | The annotated method plays the role of the method given the name methodName in the pattern named PatternName. |
PatternName associationLabel | The annotated association plays the role of the association given the label associationLabel in the pattern named PatternName. |
PatternName attributeName | The annotated attribute plays the role of the attribute given the name attributeName in the pattern named PatternName. |
Note that class and interface names start with an uppercase letter, while method names, association labels, and attribute names start with a lowercase letter. Also note that interface names are presented in italics. Abstract classes and abstract methods would also be presented in italics.
Appendix B presents the tags for the framework-related design patterns of the pattern catalog (Gamma et. al., 1995).