본문 바로가기

개발자일기

검색하기
개발자일기
프로필사진 ka0oll

  • 분류 전체보기 (25)
    • 개발 (23)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2026/02   »
일 월 화 수 목 금 토
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
Tags
  • redis
  • OOP
  • jvm
  • junit5
  • bytecode
  • Generic
  • IOC
  • Transaction
  • 서명
  • reflection
  • ddd
  • Spring Data Redis
  • SOA
  • PSA
  • JWT
  • JSON
  • spring
  • di
  • MSA
  • bounded context
  • *
  • mockito
  • Rest
  • Exception
  • AOP
  • Java
  • rest api
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Generic (1)

개발자일기

java generic, 슈퍼 타입 토큰

1. Generics 자바 5에서 추가된 기능으로서 제네릭(Generic)은 클래스 내부에서 사용할 데이터 타입을 외부에서 지정하는 기법을 의미한다 static 메소드 제네릭 public static class Utils{ public static int size(T[] anArray) { return anArray.length; } } 클래스 제네릭 class MyClass { T t; private MyClass(T t){ this.t = t; } T getT(){ return t; } } 2. type eraser 자바는 컴파일시에 제네릭 타입 정보들을 제거 한다. 런타임시에는 실제로 타입정보는 존재 하지 않고 강제 캐스팅 된다. class MyClass { Object t; private MyCl..

개발 2020. 4. 16. 20:58
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바