On the JVM platform, there’s a reflection API func...
# reflect
n
On the JVM platform, there’s a reflection API function that returns the Kotlin property that corresponds to a field. Is there a way to get the Kolin property that corresponds to the JVM method that is the property’s getter?
d
use kotlin reflection. Given a jvm class Class<*> jvm; with a public method String getMyPropertuy(); Using kotlin code: val klazz = jvm.kotlin // gets a KClass from a Class val kprop = klazz:declaredMemberProperties.first{ name == "myProperty" }