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

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.

主站蜘蛛池模板: 通城县| 巴南区| 百色市| 化隆| 澄迈县| 甘孜县| 富平县| 筠连县| 冷水江市| 鹤庆县| 彭泽县| 鲜城| 额敏县| 张家港市| 萝北县| 木里| 巩义市| 台北市| 古田县| 福清市| 盐津县| 江山市| 荥经县| 娱乐| 通化县| 福州市| 正安县| 卓尼县| 仲巴县| 德昌县| 大姚县| 报价| 高陵县| 鄯善县| 海丰县| 尼玛县| 潼关县| 龙里县| 新化县| 南华县| 宁化县|