cedric
03/13/2018, 5:39 AMclass AnnTest(@Json(name = "foo") val n: Int)
fun main(args: Array<String>) {
AnnTest::class.declaredMemberProperties.forEach {
val ann = it.findAnnotation<Json>()
println("Property: $it annotations: $ann")
}
AnnTest::class.java.declaredFields.forEach {
val ann = it.annotations
println("Property: $it annotations: ${ann.size}")
val da = it.declaredAnnotations
println("Property: $it declared annotations: ${da.size}")
}
}