p

    Patrick Jackson

    1 year ago
    Does this usage require kotlin-reflect.jar? val getter: KMutableProperty1<> = MyClass::myProperty val my value = getter.get(myInstance)
    udalov

    udalov

    1 year ago
    No, it shouldn't
    p

    Patrick Jackson

    1 year ago
    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?
    udalov

    udalov

    1 year ago
    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
    p

    Patrick Jackson

    1 year ago
    Thank you @udalov