Decorator Pattern
摘要
Composition is a widely used alternative to inheritance in programming and often provides a better design payoff. This chapter discusses the Decorator pattern that relies on object composition. This pattern is also known as the Wrapper pattern.