interface KProperty<out V> : KCallable<V>
Represents a property, such as a named val
or var
declaration. Instances of this class are obtainable by the ::
operator.
See the Kotlin language documentation for more information.
V
- the type of the property value.
Represents a property accessor, which is a get
or set
method declared alongside the property. See the Kotlin language documentation for more information.
true
if this property is const
. See the Kotlin language documentation for more information.
true
if this property is lateinit
. See the Kotlin language documentation for more information.
Calls this callable with the specified list of arguments and returns the result. Throws an exception if the number of specified arguments is not equal to the size of parameters, or if their types do not match the types of the parameters.
Calls this callable with the specified mapping of parameters to arguments and returns the result. If a parameter is not found in the mapping and is not optional (as per KParameter.isOptional), or its type does not match the type of the provided value, an exception is thrown.
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.
© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/-k-property/index.html