| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 |
Tags
- 추상클래스
- 가변인자
- 자바 야구게임
- 자바
- 상속예제
- 다형성
- 단축키
- while
- Random
- 다운캐스팅
- 로또
- full text indexing
- jquery
- 전체
- 25가지 효율적인 sql작성법
- 형변환
- 전자정부
- 업캐스팅
- 스프링
- Login with OAuth Authentication
- 이클립스
- 상속
- angular2
- Full text
- 전체텍스트
- Validations
- IBatis procedure
- 페이징
- 야구게임
Archives
- Today
- Total
목록2016/11/25 (1)
nalaolla
java factory pattern (팩토리 패턴)
factory pattern은 유명한 디자인 패턴 중 하나이다. 이것 역시 JDK 및 우리가 잘 알고 있는 Spring, Struts 프레임워크에 많이 사용되고 있다.super class와 여러개의 sub class가 있는 상황에서 input이 발생하면 하나의 sub class를 반환해야 할때 factory pattern이 사용된다. factory class는 client class로 부터 인스턴스를 생성하는 책임을 가져온다.슈퍼 클래스factory pattern에서 super class는 interface, abstract class 또는 일반적인 java class가 될 수 있다. 예제에서 super class 로 abstract class를 사용하는데, 테스팅을 위해 toString() method..
SPRING
2016. 11. 25. 15:13