Also known as Post pattern, Extension Object pattern
Intent Adapt an object to different client’s needs through transparently attached role objects, each one representing a role the object has to play in that client’s context. The object manages its role set dynamically. By representing roles as individual objects, different contexts are kept separate and system configuration is simplified.
Class diagram Applicability Use the Role Object pattern, if:
You want to handle a key abstraction in different contexts and you do not want to put the resulting context specific interfaces into the same class interface.