Decorator pattern
From Wiki @ Karl Jones dot com
In object-oriented programming, the decorator pattern (also known as Wrapper, an alternative naming shared with the Adapter pattern) is a design pattern that allows behavior to be added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class.
The decorator pattern is often useful for adhering to the Single responsibility principle, as it allows functionality to be divided between classes with unique areas of concern.
See also
- Abstract class
- Abstract factory
- Adapter pattern
- Aspect-oriented programming
- Composite pattern
- Immutable object
- Object-oriented programming
- Single responsibility principle
External links
- Decorator pattern @ Wikipedia