装饰器模式
2017-10-03 17:44:06 0 举报
装饰器模式装饰器模式装饰器模式
作者其他创作
大纲/内容
被装饰类与装饰器抽象类共同实现的接口——IComponent
+ operation(params):void要被增加功能的方法
ConcreteDecoratorB
+ ConcreteDecoratorA(component:IComponent)-addedBehavior():void+ operation(params):void
装饰器抽象类——Decorator
-component:IComponent=null
+ Decorator(component:IComponent)+ operation(params):void
被装饰类——ConcreteComponent
+ operation(params):void
ConcreteDecoratorA
-addedState:string
+ ConcreteDecoratorA(component:IComponent)+ operation(params):void
0 条评论
下一页