我查找了有关 wrapper 和贴面的详细信息。看起来关于他们的信息很少。如何在设计图中或 Java 中使用它?
有人能给我解释一下吗?谢谢。
最佳答案
适配器或包装器(我从未听说过有人称其为 Verneer)是四种设计模式之一。这是它的用途:
Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces
看看this .
最权威的引用文献是《四人帮》"Design Patterns",现已 15 岁了。 .
关于java - 什么是包装函数和饰面函数?如何将它们应用到系统设计中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4359275/