java 썸네일형 리스트형 변경불가 리스트 만들기 Collections.unmodifiableList List METHODS_TO_CHECK = Collections.unmodifiableList(Arrays.asList("POST", "PUT", "DELETE")); 더보기 is a has a Is a , Has a 관계 기존의 클래스의 특성을 가지는 새로운 클래스를 만드는 방법은 크게 2 가지가 있다. 기존의 클래스를 상속받아 만드는 방법과 기존의 클래스를 클래스 멤버로 가지는 방법이다. 첫번의 방법을 Is a , 관계라 하고 두 번째의 방법을 has a 라고 한다. 이 개념을 명확히 해서 클래스 설계에 적용하면 고민하지 않고 상속과 멤버의 결정을 내릴 수 있다. 사람 학생 군인 회사원 대학생 고등학생 중학생 3.1 Is a 관계 이 방법은 “ 새로운 클래스가 기존의 클래스의 한 종류이다.(is a)” “ New Object is a type of a original class.” 라는 말이다. 이 개념이 성립하면 새로운 클래스는 기존의 클래스를 extends 를 사용해 상속 받아만든다. 사.. 더보기 generic 타입 추론. Generic 타입 추론 유틸 만들기프로젝트/SLT : 2010/06/11 12:23 @Transactionalpublic class GenericServiceImpl implements GenericService { @Autowired ApplicationContext applicationContext; private Class daoClass; protected D dao; public GenericServiceImpl(){ ParameterizedType genericSuperclass = (ParameterizedType) getClass().getGenericSuperclass(); Type type = genericSuperclass.getActualTypeArguments()[0]; if (.. 더보기 이전 1 ··· 12 13 14 15 16 17 다음