画出结构型设计模式的类图

装饰器模式 Decorator

Attach additional responsibilities to an object dynamically.

Decorators provide a flexible alternative to subclassing for extending functionality.

适配器模式 Adapter

Convert the interface of a class into another interface clients expect.

Adapter lets classes work together that couldn't othwerwise because of incompatible interfaces. 

桥接模式 Bridge

Decouple an abstraction from its implementation so that the two can vary independently.

组合模式 Composite

Compose objects into tree structures to represent part-whole hierarchies.

Composite lets clients treat individual objects and compositions of objects uniformly.

代理模式 Proxy

Provide a surrogate or placeholder for another object to control access to it.

静态代理

JDK动态代理

享元模式 Flyweight

Use sharing to support large numbers of fine-gained objects efficiently.

外观模式 Facade

Provide a unified interface to a set of interfaces in a subsystem.

Facade defines a high-level interface that makes the subsystem easier to use.

 

posted @   !ɹO  阅读(11)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
点击右上角即可分享
微信分享提示