provideDelegate

Common
JVM
JS
Native
1.0
abstract operator fun provideDelegate(
    thisRef: T,
    property: KProperty<*>
): D

(source)

Returns the delegate of the property for the given object.

This function can be used to extend the logic of creating the object (e.g. perform validation checks) to which the property implementation is delegated.

Parameters

thisRef - the object for which property delegate is requested.

property - the metadata for the property.

Return the property delegate.