Decorator pattern

From Wiki @ Karl Jones dot com
Revision as of 08:17, 24 August 2016 by Karl Jones (Talk | contribs) (Created page with "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...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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