摘要: 一、模式定义 在不改变原有对象的前提下(不改变ConcreteComponent情况下),给原有对象扩展功能(利用ConcreteDecorator扩展功能,在ConcreteDecorator中注入ConcreteComponent)。如下所示: 二、应用场景 扩展一个类的功能,或者给一个类添加一 阅读全文
posted @ 2026-02-11 21:57 Carey_ccl 阅读(143) 评论(0) 推荐(0)