Decorator
The book has now been published and the content of this chapter has likely changed substanstially.An object that is placed between a client and another object for the purose of adding behavior.
Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
A Decorator implements the same interface as the decorated object and adds behavior before or after it calls the same method (on the decorated object) as was called on itself.
From [GOF].
Copyright © 2003-2008 Gerard Meszaros all rights reserved