I want to search for an annotation of the class given its property.
I actually solved my problem by “going-to-Java-and-back-to-Kotlin way”:
val annotation = KProperty1<*, *>.javaField?.declaringClass?.kotlin?.findAnnotation<MyAnnotation>()
I want to search for an annotation of the class given its property.
I actually solved my problem by “going-to-Java-and-back-to-Kotlin way”:
val annotation = KProperty1<*, *>.javaField?.declaringClass?.kotlin?.findAnnotation<MyAnnotation>()