June 2018
Intermediate to advanced
280 pages
7h 46m
English
The following diagram models the decorator pattern. It shows that the extended component and the decorated component can be replaced, one with the other. The decorator can be applied recursively; it can be applied to an existing component implementation but also applied to another decorator, or even to itself. The decorator interface is not fixed to the component interface; it can add extra methods, which may be used by the decorator's children, as shown in this diagram

We can distinguish between the following actors in the implementation diagram:
Read now
Unlock full access