Does this usage require kotlin-reflect.jar? val ge...
# reflect
p
Does this usage require kotlin-reflect.jar? val getter: KMutableProperty1<> = MyClass::myProperty val my value = getter.get(myInstance)
u
No, it shouldn't
p
Interesting. I've read through docs and wasn't able to find a definitive answer. KProperty and KMutableProperty and in the kotlin.reflect package. Are all the classes in kotlin.reflect not in the kotlin-reflect.jar?
u
Unfortunately, there’s no good docs on that. Basically all of `get`/`set`/`invoke` in KProperty/KFunction do not require reflection, as well as different kinds of names (
KProperty/KFunction.name
,
KClass.simpleName/qualifiedName
),
KClass.isInstance
, and `equals`/`hashCode`
👍 1
p
Thank you @udalov