1 / 13
文档名称:

软件设计模式2——潘爱民.pdf

格式:pdf   大小:1,056KB   页数:13页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

软件设计模式2——潘爱民.pdf

上传人:iris028 2022/5/18 文件大小:1.03 MB

下载得到文件列表

软件设计模式2——潘爱民.pdf

相关文档

文档介绍

文档介绍:: .
– 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