본문 바로가기
[Kotlin Tutorial] Annotation 과 Reflection #2 [Kotlin Tutorial] Annotation 과 Reflection #2 참조 : Kotlin in action 10.2. Reflection: introspecting Kotlin objects at runtime -Kotlin 에서의 reflection 은 java.lang.reflect package 의 API 들과 kotlin.reflect package 의 API 들을 사용한다.Kotlin 의 reflection 은 Java 에 없는 nullable type 이나 properties 들의 접근을 가능하게 한다. -runtime lib 의 size 를 줄이기 위해, kotlin 의 reflection API 는 kotlin-reflect.jar 라는 별개의 jar 로 pakcage 되어 있.. 2017. 9. 12.
[Kotlin Tutorial] Kotlin 의 Type system #2 [Kotlin Tutorial] Kotlin 의 Type system #2 참조 : Kotlin in action 6.2. Primitive and other basic types 6.2.1. Primitive types: Int, Boolean, and more -Kotlin 은 primitive type 과 wrapper type 을 구분하지 않는다. -그렇다면 Int 가 object 라면 Kotlin 은 모든 primitive type 을 실제로 object 로 만드는가?당연히 그렇게 안 했다.compiler 가 대부분의 Int type 을 Java 의 primitive type 으로 변형시킨다.generic, collection 등은 원래 Java 의 Integer 형태만 담을 수 있으므로 이 경.. 2017. 8. 22.
[Kotlin Tutorial] Kotlin 소개 - Kotlin : what and why [Kotlin Tutorial] Kotlin 소개 - Kotlin : what and why 참조 : Kotlin in Action -Kotlin 은 Java platform 을 targeting 한 새로운 프로그래밍 언어.Java 코드와 함께 쓰일 수 있다.Android 개발 뿐만 아니라 Server-side 개발에도 쓰일 수 있다. -Java 의 iib, framework 와 함께 쓰일 수 있고, Java 와 비교해 Performance 도 거의 동일하다. 1.1. A Taste of Kotlin -http://try.kotl.in 을 통해 코드 실습을 할 수 있다. -data class Person(val name: String, val age: Int? = null) fun main(args: A.. 2017. 7. 12.
반응형