semoro
01/17/2017, 12:03 AMimport kotlin.reflect.KClass
annotation class Thingy(val type: KClass<*>)
@Thingy(Int::class)
class AnnotatedThingy
fun test() {
val thingies = AnnotatedThingy::class.annotations.filterIsInstance<Thingy>()
println(thingies.single().type == Int::class)
}
fun main(args: Array<String>) {
test()
}
Worked for me and prints true