Decorator_Pattern
2016-01-09 16:28:51 4 举报
Decorator pattern
作者其他创作
大纲/内容
Component
+ operation1(params)+ operation2(params)
component.operation(params)
ConcreteComponentB
Decorator放的是具体装饰类共同的抽象行为
ConcreteComponentA
ConcreteDecoratorA
+ operation1(params)+ operation2(params)+ newOperation()
ConcreteDecoratorB
+ operation1(params)+ operation2(params)+ newOperation()+ newOperation2()
Decorator
protected component: Component
0 条评论
下一页