1. 什么是装饰者模式
动态地将责任附加到对象上, 想要扩展功能, 装饰者提供有别于继承的另一种选择.
2. 示例UML图
3. 示例代码地址
https://github.com/ganlu19940318/Head-First/tree/master/Decorator%20Pattern
4. 参考链接
<< Head First 设计模式 >>
记录学习点滴
动态地将责任附加到对象上, 想要扩展功能, 装饰者提供有别于继承的另一种选择.
https://github.com/ganlu19940318/Head-First/tree/master/Decorator%20Pattern
<< Head First 设计模式 >>
打赏