Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
design_pattern:decorator_pattern [2021/02/07 03:26] – [Decorator Pattern] ledyxdesign_pattern:decorator_pattern [2022/06/14 17:59] (current) – [Decorator Pattern] ledyx
Line 4: Line 4:
     * 기능 확장이 필요할 때 서브클래싱 대신 쓸 수 있는 유연한 대안 [(https://ko.wikipedia.org/wiki/%EB%8D%B0%EC%BD%94%EB%A0%88%EC%9D%B4%ED%84%B0_%ED%8C%A8%ED%84%B4)]     * 기능 확장이 필요할 때 서브클래싱 대신 쓸 수 있는 유연한 대안 [(https://ko.wikipedia.org/wiki/%EB%8D%B0%EC%BD%94%EB%A0%88%EC%9D%B4%ED%84%B0_%ED%8C%A8%ED%84%B4)]
   * [[Composite Pattern]]과 무엇이 다른가?   * [[Composite Pattern]]과 무엇이 다른가?
-    * "Decorator Pattern은 테두리 장식을 중복해서 기능을 추가"하는 것에 집중. 이 때, 내용물을 변경하지 않고 기능을 추가할 수 있다.+    * "Decorator Pattern은 테두리 장식을 중복해서 **__<fc red>기능을 추가</fc>__**"하는 것에 집중. 이 때, 내용물을 변경하지 않고 기능을 추가할 수 있다.
   * 예시   * 예시
 <sxh java ; gutter:false> <sxh java ; gutter:false>
 BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File("text.txt"))) BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File("text.txt")))
 </sxh> </sxh>
- 
  
 {{tag>Architecture Modeling Design_Pattern Structural}} {{tag>Architecture Modeling Design_Pattern Structural}}
design_pattern/decorator_pattern.1612668377.txt.gz · Last modified: 2021/02/07 03:26 by ledyx