Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You'd like to delegate some of an object's method calls to a different object, or make one object capable of " impersonating" another.
If you want to completely impersonate another object, or delegate most of one object's calls to another, use the delegate library. It generates custom classes whose instances can impersonate objects of any other class. These custom classes respond to all methods of the class they shadow, but they don't do any work of their own apart from calling the same method on some instance of the "real" class.