I'm used to something like `getDeclaringClass` fro...
# reflect
d
I'm used to something like
getDeclaringClass
from Java.
kotlin.jvm.internal.CallableReference
has
getOwner
, but that is internal API and only available for references...
u
Currently, you have to use Java reflection API for this e.g.
Copy code
val property: KProperty<*> = ...
property.javaGetter!!.declaringClass.kotlin
d
Thanks. In case of inherited properties, which java method will I get?
u
I suppose you'll get the original method (in the base class), but not sure
d
Ok, I'll do some testing then, thanks again!