toPropertySetter

Converts a Kotlin mutable property into a PropertySetter. The resulting setter will modify the property value on the target object.

Return

a PropertySetter that modifies the property value

Example usage:

val propertySetter = MyClass::name.toPropertySetter()
val instance = MyClass("John")
propertySetter.set(instance, "Jane") // changes name to "Jane"

Parameters

T

the type of the target object

V

the type of the property value