August 2018
Intermediate to advanced
314 pages
8h 9m
English
The decorator pattern is one of the most frequently used GoF structural patterns. Its class diagram is shown in the following figure:

The constituent elements of this pattern are described in Design Patterns: Elements Of Reusable Object-Oriented Software (the GoF book), and are shown in the following table:
| Component | This defines the interface for objects that can have responsibilities added to them dynamically |
| ConcreteComponent | This defines an object to which additional responsibilities can be attached |
| Decorator | This maintains a reference to a component object, and defines an interface that conforms to a component's ... |
Read now
Unlock full access