设计模式总结

我见青山应如是 / 2023-05-07 / 原文

设计模式总结

设计模式分为三大类:创建型模式、结构型模式、行为模式

一、创建型模式

1.工厂方法 Factory Method

2.抽象工厂 Abstract Factory

3.生成器 Builder

4.原型 Prototype

5.单例 Singleleton

二、结构型模式

1.适配器 Adapter

2.桥接 Bridge

3.组合 Composite

4.装饰 Decorator

5.门面 Facade

6.享元 Flyweight

7.代理 Proxy

行为模式

1.责任链 Chain of Responsibility

2.命令 Command

3.解释器 Interpreter

4.迭代器 Iterator

5.中介者 Mediator

6.快照 Memento

7.观察者 Observer

8.状态 State

9.策略 Strategy

10.模版方法 Template Method

11.访问者 Visitor