Decorator (also referred as Wrapper) is classified by GoF as a structural pattern. Its purpose is to:“Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.” Both inheritance and the decorator ...
More...