Skip to main content

7 docs tagged with "Structural Pattern"

View all tags

Adapter

适配器通过内部使用新接口规定的属性/方法, 创建一个外观与旧接口一致的方法

Bridge

Split large class or set of closely related classes into two separate hierarchies:

Composite

- 封装: 组合模式将对象组合成树形结构, 以表示 部分+整体 的层次结构.

Decorator

- 重写/重载/扩展对象原有的行为 (Methods), 但不改变对象原有属性.

Flyweight

减小内存开销 (Performance Optimization):

Proxy

通过一个代理对象: