Design Pattern - (Decorator|wrapper)

> Code - (Programming|Computer) Language > Design Pattern

1 - About

The decorator pattern, also known as a wrapper allows you to extend the run-time behaviour of an object. This process is known as decorating.

A (wrapper|decorator) class is any class which “wraps” or “encapsulates” the functionality of another class or component.

They have several advantages:

  • Protection against the change of code
  • Simplification of code
Advertising

3 - Documentation / Reference