The Decorator Pattern
The Decorator Pattern
复制标题
装饰者模式
DOI:
10.1007/978-1-4842-0394-1_14
复制
发表时间:
2015
期刊:
影响因子:
--
通讯作者:
Adam Freeman
中科院分区:
文献类型:
--
作者:
Adam Freeman
In this chapter, I describe the decorator pattern, which allows the behavior of an object to be selectively modified at runtime. This pattern has a number of uses but has the most impact when working with classes that cannot be modified. The idea of selective modification means that you can choose which objects are changed and which retain their original functionality. Table 14-1 puts the decorator pattern into context.