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

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.

主站蜘蛛池模板: 鹰潭市| 洪洞县| 孟连| 墨脱县| 深州市| 临夏市| 蓬安县| 开平市| 新田县| 阜阳市| 体育| 旺苍县| 永和县| 九龙坡区| 永丰县| 黎城县| 台江县| 长岭县| 栖霞市| 罗定市| SHOW| 邵阳市| 江西省| 铜鼓县| 西青区| 濉溪县| 宁陵县| 印江| 河源市| 桑日县| 天水市| 枞阳县| 长丰县| 临沭县| 华亭县| 沧州市| 顺平县| 合肥市| 顺昌县| 绥中县| 宁明县|