The UML Profile for Framework Architectures
B.13 Decorator pattern tags
Figure B.13 shows the static structure of the Decorator pattern (Gamma et al. 1995) annotated with UML-F tags. Table B.13 summarizes the Decorator pattern UML-F tags. Decorator corresponds to the Decorator framework construction principle, which is a recursive combination of template and hook methods in which each instance of the object containing the template method can only refer to zero or one instance of an object containing the hook method. This construction principle can be applied in order to selectively add behavior by composition without changing the hook directly.
Figure B.13. Structure of the Decorator pattern annotated with UML-F tags.
| Tags | Decorator Component , Decorator Decorator , Decorator ConcreteComponent , Decorator operation , Decorator operation , Decorator component |
| Apply to | As shown in Fig. B.13: Class ( Decorator Component , Decorator Decorator , Decorator ConcreteComponent ) Method ( Decorator operation , Decorator operation ) Interface ( Decorator Component ) Association ( Decorator component ) |
| Type | String. |
| Expansion | not applicable |