Difference between revisions of "Decorator"

From CDOT Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
===Decorator Design Pattern===
 
===Decorator Design Pattern===
 +
 +
[[Image:DecoratorUML.png|frame|UML Class diagram of the decorator pattern]]
 +
 +
Attach additional responsibility to an object dynamically. Decoratores provide a flexible alternative to subclassing for extending functionality.
 +
 +
==Sample Code==

Revision as of 18:22, 3 February 2007

Decorator Design Pattern

UML Class diagram of the decorator pattern

Attach additional responsibility to an object dynamically. Decoratores provide a flexible alternative to subclassing for extending functionality.

Sample Code