Trying to recover validation-api annotations from ...
# java-to-kotlin-refactoring
d
Trying to recover validation-api annotations from JPA entites in Kotlin however it appears the CLASS level annotations are in the expected place But the column/field/member/accessor-property-method annotations are in some other (secret/hidden) place like:
Copy code
val kclass = MyEntity::class
val randomMember = kclass.members.findLast { it.name == "randomProperty" }  // KCallable<*>
val kmutable = if(randomMember is KMutableProperty) randomMember as KMutableProperty else null  // KMutableProperty is the real type
val javaField = kmutable?.annotations  // this is the only non-empty annotations field/member/method/property that exists around "randomProperty"