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

  • Spring 5 Design Patterns
  • Dinesh Rajput
  • 110字
  • 2021-07-08 09:59:36

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.

主站蜘蛛池模板: 广西| 辽阳县| 军事| 新民市| 磴口县| 河间市| 剑河县| 化州市| 额济纳旗| 通海县| 邵阳市| 宁阳县| 黎城县| 漳平市| 卓资县| 逊克县| 乌兰浩特市| 清流县| 永德县| 元氏县| 巴林右旗| 萍乡市| 南岸区| 宕昌县| 盐亭县| 桐柏县| 广饶县| 永吉县| 托克逊县| 甘德县| 金平| 海南省| 义马市| 若尔盖县| 普兰县| 贺州市| 莱西市| 金寨县| 阜康市| 咸丰县| 肇源县|