The information in a design pattern’s documentation will be described as follows:
Pattern name and classification:
The pattern name specifies the essence of the pattern precisely. A good name is a key as it will become a part of our design vocabulary. Classification specifies the type of pattern.
A short statement that tells us what the pattern does and which design issue or problem the pattern addresses.
Also known as:
Other well known names for the pattern, if any.
A scenario that illustrates a design problem and how the class and object structures solve that problem. The scenario will help us understand the abstract pattern definition.
This specifies in which situations a design pattern can be applied. What are the examples of poor designs that the pattern can address? How to recognize these situations?
A graphical representation of the classes involved in the pattern following the notations of Object Modeling Technique (OMT). We also use interaction diagrams to illustrate sequences of the requests and the collaborations between objects.
The classes and / or objects participating in the pattern and their responsibilities.
How the classes and objects collaborate to carry out their responsibilities.
Tells us what are the costs and benefits of using the pattern. Also tells us which part of the system can be changed independently.
Specifies what techniques we should be aware of when implementing the pattern and also tells us if there are any language specific issues.
Code fragments that tell us how to implement the pattern in java.
Example usage of the patterns in the real world.
Specifies which other patterns are related to this pattern and what are the differences between them.