interface KProperty2<D, E, out R> : KProperty<R>, (D, E) -> R
interface KProperty2<T1, T2, out R> : KProperty<R>, (T1, T2) -> R
Represents a property, operations on which take two receivers as parameters, such as an extension property declared in a class.
D
- the type of the first receiver. In case of the extension property in a class this is the type of the declaring class of the property, or any subclass of that class.
E
- the type of the second receiver. In case of the extension property in a class this is the type of the extension receiver.
R
- the type of the property.
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.
Returns a Java Field instance corresponding to the backing field of the given property, or null
if the property has no backing field.
Returns a Java Method instance corresponding to the getter of the given property, or null
if the property has no getter, for example in case of a simple private val
in a class.
Calls a callable in the current suspend context. If the callable is not a suspend function, behaves as KCallable.call. Otherwise, calls the suspend function with current continuation.
Calls a callable in the current suspend context. If the callable is not a suspend function, behaves as KCallable.callBy. Otherwise, calls the suspend function with current continuation.
Returns true if this element is annotated with an annotation of type T.
This is an experimental API. Given a class for a compiled Kotlin lambda or a function expression, returns a KFunction instance providing introspection capabilities for that lambda or function expression and its parameters. Not all features are currently supported, in particular KCallable.call and KCallable.callBy will fail at the moment.
© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-property2/index.html