toIntGetter
Converts a Kotlin property to an integer property getter.
This method validates that the property returns an Int type and creates a PropertyGetter for accessing the property value.
Example usage:
class Order(val version: Int)
val order = Order(1)
val versionGetter = Order::version.toIntGetter()
val version = versionGetter.get(order) // Returns 1Content copied to clipboard
Return
a PropertyGetter that can retrieve the integer value of this property
Parameters
T
the type of the object containing the property
Throws
if the property is not of type Int