Difference between revisions of "Decorator"

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

Revision as of 17:24, 3 February 2007

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

UML Class diagram of the decorator pattern

Sample Code