svenjacobs
03/23/2017, 7:32 AMClass
or a Kotlin KClass
is expected. ::class.java
will return Class
.moelholm
03/23/2017, 7:55 AMokkero
03/23/2017, 8:08 AMKClass
does not in general share an is-a relationship with Class
See quote:
"If you need to specify a class as an argument of an annotation, use a Kotlin class (KClass). The Kotlin compiler will automatically convert it to a Java class, so that the Java code will be able to see the annotations and arguments normally."
https://kotlinlang.org/docs/reference/annotations.html#constructorsmoelholm
03/23/2017, 8:14 AM