The Decorator Pattern

The Decorator Pattern
复制标题

装饰者模式

DOI:
10.1007/978-1-4842-0394-1_14
复制
发表时间:
2015
期刊:
The Urologic clinics of North America
影响因子:
--
通讯作者:
Adam Freeman
Adam Freeman
中科院分区:
--
文献类型:
--
作者:
Adam Freeman

文献摘要

被引文献

相似文献

在本章中,我将描述装饰器模式,它允许在运行时有选择地修改对象的行为。此模式有很多用途,但在处理无法修改的类时影响最大。选择性修改的思想意味着您可以选择更改哪些对象,哪些对象保留其原始功能。表14-1给出了装饰器模式的上下文。
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.