본문 바로가기
[도서 목차 정리] Kotlin in action [도서 목차 정리] Kotlin in action Kotlin in action 을 공부하면서 정리한 내용입니다.Java 를 어느 정도 이해하고 숙달한 사람들이 이해하기 좋습니다.Java 와 동일하거나 너무 당연한 기본적인 내용은 정리하지 않았습니다. Kotlin 소개 - Kotlin : what and why Kotlin 기초 #1 - Chap2. Kotlin basics Kotlin 기초 #2 - Chap2. Kotlin basics 함수 정의하고 호출하기 #1 - Chap 3. Defining and calling functions 함수 정의하고 호출하기 #2 클래스, objects, 그리고 인터페이스 #1 - Chap4. Classes, objects, and interfaces 클래스, obje.. 2017. 9. 25.
[Kotlin Tutorial] Generics - Chap9. Generics 참조 : Kotlin in action 9.1. Generic type parameters -Java 와 기본적으로 generic 사용법은 동일하다. -Type Inference 는 가능하지만 명시적으로 써야 하는 케이스도 있다.val authors = listOf(“Dmitry”, “Svetlana”) // type inference 가능 val readers : MutableList = mutableListOf() // type inference 불가능, 명시적 선언val readers = mutableListOf() -Kotlin 에서는 raw type generic 을 사용할 수 없다. ( Java 로 치자면 그냥 List ) 9.1.1. Generic functions and properties.. 2017. 9. 5.
[Java] Reflection Tutorial - Generics Java, Reflection Tutorial - Generics 일반적으로 Generics 정보는 runtime 에 사라진다고 알고 있지만 꼭 그렇지만은 않다. The Generics Reflection Rule of Thumb 일반적으로 List 와 같은 녀석들은 어떤 Generic 이 쓰였는지 알기 어렵다.하지만 parameterized 된 method 나 field 를 조사해보면,어떤 generic 이 사용되었는지 알 수 있다. Generic Method Return Types Method method = TestClass.class.getMethod( "getStringList", null );Type returnType = method.getGenericReturnType(); if ( ret.. 2013. 12. 27.
반응형