聊聊设计模式(4):装饰模式

装饰模式,动态地给一个对象增加一些额外的职责 ( Responsibility ),就增加对象功能来说,装饰模式比生成子类实现更为灵活。

本文同步自 小胡子哥的个人网站,原文地址: http://www.barretlee.com/blog/2017/02/14/the-decorator-pattern-in-design-patterns/

Advertisements
聊聊设计模式(4):装饰模式

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s