W3cubDocs

/Kotlin

getDelegate

abstract fun getDelegate(receiver: T): Any?

Platform and version requirements: Kotlin 1.1

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

KProperty1.getExtensionDelegate

© 2010–2017 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