[Kotlin Tutorial] Annotation 과 Reflection #1 - Chap 10. Annotations and reflection [Kotlin Tutorial] Annotation 과 Reflection #1 - Chap 10. Annotations and reflection 참조 : Kotlin in action 10.1. Declaring and applying annotations. 10.1.1. Applying annotations -Annotation 사용법은 Java 와 동일하다. @ 를 prefix 로 하고 annotation name 을 써주면 된다. -@Deprecated 의 경우 Kotlin 은 Java 의 것에서 향상되었다.replaceWith parameter 가 추가되어, 새로운 version 의 API 에 연결될 수 있다.@Deprecated(“Use removeAt(index) instead.”, Rep.. 2017. 9. 7. [Java] Reflection Tutorial - Class [Java] Reflection Tutorial - Class Java Reflection 은 class, interface, field, 그리고 method 를 runtime 에 조사할 수 있도록 해준다. 새로운 object 를 만들 수도 있고, method 를 호출할 수도 있다. script language 가 runtime 에 java 의 함수를 호출한다거나, database table 과 object 를 맞출 때 자주 사용한다. Class Class 로 부터 얻을 수 있는 정보들. Class NameClass Modifier ( public, private, synchronized... )Pakcage InfoSuper classImplemented InterfacesConstructorsMeth.. 2013. 11. 12. 반응형 이전 1 다음