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

  • 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.

主站蜘蛛池模板: 乌兰察布市| 新野县| 张家口市| 榆社县| 神木县| 鹰潭市| 黄平县| 慈溪市| 衡阳县| 叶城县| 寿阳县| 濉溪县| 科尔| 鄂托克旗| 荆州市| 佛教| 东阳市| 绥阳县| 久治县| 石河子市| 武清区| 辽阳县| 丹阳市| 广河县| 永德县| 山丹县| 萍乡市| 密山市| 托里县| 精河县| 喜德县| 珠海市| 昌黎县| 铜鼓县| 青铜峡市| 平邑县| 海城市| 韶关市| 西和县| 常熟市| 越西县|