官术网_书友最值得收藏!

Common requirements for the adapter pattern

The following are the common requirements for this design pattern to addresses the design problems:

  • If you are to use this pattern in your application, there is a need to use an existing class with an incompatible interface.
  • Another use of this pattern in your application is when you want to create a reusable class that collaborates with classes that have incompatible interfaces.
  • There are several existing subclasses to be used, but it's impractical to adapt their interface by sub classing each one. An object adapter can adapt the interface of its parent class.

Let's see how Spring implements the adapter design pattern internally.

主站蜘蛛池模板: 方城县| 康乐县| 盘锦市| 个旧市| 揭阳市| 舞钢市| 满洲里市| 阿坝| 大新县| 微山县| 东乌| 长汀县| 洛南县| 沂南县| 西畴县| 盖州市| 开封县| 九龙县| 哈尔滨市| 达州市| 布拖县| 宁武县| 德惠市| 溆浦县| 隆子县| 新沂市| 泗阳县| 宁阳县| 肇东市| 宁阳县| 全椒县| 保康县| 广饶县| 周口市| 蚌埠市| 漳州市| 来安县| 四平市| 酉阳| 武强县| 广元市|