Decorator

Back to Structural Patterns

Add behavior dynamically without modifying class. Attach additional responsibilities to an object dynamically, providing a flexible alternative to subclassing for extending functionality. Decorators wrap the original object and delegate to it.

Key Properties


design-patterns structural decorator