W3cubDocs

/Kotlin

getDelegate

Platform and version requirements: JVM (1.1), JS (1.1)
abstract fun getDelegate(receiver: T): Any?
For JVM

Returns the value of the delegate if this is a delegated property, or null if this property is not delegated. See the Kotlin language documentation for more information.

Note that for a top level extension property, the delegate is the same for all extension receivers, so the actual receiver instance passed in is not going to make any difference, it must only be a value of T.

Parameters

receiver - the receiver which is used to obtain the value of the property delegate. For example, it should be a class instance if this is a member property of that class, or an extension receiver if this is a top level extension property.

See Also

kotlin.reflect.full.getExtensionDelegate

For JS

Returns the value of the delegate if this is a delegated property, or null if this property is not delegated. See the Kotlin language documentation for more information.

Note that for a top level extension property, the delegate is the same for all extension receivers, so the actual receiver instance passed in is not going to make any difference, it must only be a value of T.

Parameters

receiver - the receiver which is used to obtain the value of the property delegate. For example, it should be a class instance if this is a member property of that class, or an extension receiver if this is a top level extension property.

See Also

kotlin.reflect.full.getExtensionDelegate

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-property1/get-delegate.html