Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
design_pattern:adapter_pattern [2021/02/07 03:15] – external edit 127.0.0.1design_pattern:adapter_pattern [2024/02/05 13:16] (current) – [Target, Adapter] ledyx
Line 7: Line 7:
     * 다른 용도로 감싸기때문에 'Wrapper' Pattern이라고도 불림.     * 다른 용도로 감싸기때문에 'Wrapper' Pattern이라고도 불림.
  
-{{tag>Architecture Modeling DesignPattern Structural}}+{{tag>Architecture Modeling Design_Pattern Structural}}
  
 = 상속을 이용한 구현 = = 상속을 이용한 구현 =
Line 89: Line 89:
  * 필요한, 변환될 것. Target  * 필요한, 변환될 것. Target
  */  */
-public abstract class NewVerAPI { +public interface NewVerAPI { 
- public abstract void printMessage(); + void printMessage(); 
- public abstract void printVersion();+ void printVersion();
 } }
 </sxh> </sxh>
Line 99: Line 99:
  * 필요한, 변환될 것의 구현체. Adapter  * 필요한, 변환될 것의 구현체. Adapter
  */  */
-public class NewVerAPIImpl extends NewVerAPI {+public class NewVerAPIImpl implements NewVerAPI {
  private OldVerAPI oldVerAPI;  private OldVerAPI oldVerAPI;
   
design_pattern/adapter_pattern.1612667712.txt.gz · Last modified: 2021/02/07 03:15 by 127.0.0.1