您的位置:首页 > 其它

decorate -- 通过反复包含对像,并对已包含对象方法添加功能

2009-08-14 16:23 260 查看
Function:
The decorator pattern can be used to make it possible to extend (decorate) the functionality of a class at runtime.
Actors:
FunctionInterface, BasicFunctionClass, decorator, concreteDecorator
Summary
FunctionInterface is to define decoratable method.
BasicFunctionClass defines the basic functionality.
Decorator is the core of this design pattern, is has a FunctionInterface property.
All ConcreteDecorators will overrite the method and patch new functionality to the overriden class.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐