文档介绍:: .
– Related Patterns
– 粒度 – Examples,Known uses
复****creational patters Structural Patterns
• Factory Method
– 本质:用一个virtual method完成创建过程 • Adapter
• Abstract Factory • Bridge
一个 族的 构成了一个 接口
– product factory method factory • Composite
•Prototype
– 通过product原型来构造product,Clone+prototype manager • * Decorator
• Builder • Facade
– 通过一个构造算法和builder接口把构造过程与客户隔离开
• Singleton • Flyweight
– 单实例类型,如何构造这单个实例?如何访问这单个实例? • * Proxy
• Finder
– 把对象的获取过程与客户隔离开
1模式 7: Adapter (一) Adapter模式(二)
• Aliases:Wrapper • Applicability:Use the Adapter pattern when
•Intent – you want to use an existing class, and its interface does
– Convert the interface of a class into another interface not match the one you need.
clients expect. Adapter lets classes work together that – you want to create a reusable class that coope