Objectifier

[PLoPD1]

Structural

Intent

Allow an object to easily vary some behavior or property independently of others.

Solution

  1. Create an abstract object which provides a common interface for specific implementations of the variable behavior or property.
  2. Create concrete objects descended from AbstractObject which implement the specific behavior or property.
  3. Define a reference to the AbstractObject in the Client and assign it to one of the ConcreteObjects at runtime.
  4. Delegate all operations for the specific behavior or property from the Client to the SpecificObject using the AbstractObject reference.

Consequences

Related Patterns

Strategy and State are specialized forms of this pattern

Source: [PLoPD1]

"Relationships between Design Patterns," W. Zimmer, in

Pattern Languages of Program Design (1)

Pattern Languages of Program Design 1  [Barnes&Noble]