Skip to content
EntityQ23805· pop 6· linked from 106 articles

委托模式

Sign in to save

design pattern in object-oriented programming where an object, instead of performing one of its stated tasks, delegates that task to an associated helper object

Article · 中文

委托模式(delegation pattern)是软件设计模式中的一项基本技巧。在委托模式中,有两个对象参与处理同一个请求,接受请求的对象将请求委托给另一个对象来处理。委托模式是一项基本技巧,许多其他的模式,如、策略模式、访问者模式本质上是在更特殊的场合采用了委托模式。委托模式使得我们可以用来替代继承,它还使我们可以模拟mixin。

Abstract from DBpedia / Wikipedia · CC BY-SA

Available in 6 languages

via Wikidata sitelinks · CC0