Decorator pattern

From Wiki @ Karl Jones dot com
Jump to: navigation, search

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

External links