W3cubDocs

/Kotlin

Package kotlin.reflect

Runtime API for Kotlin reflection

Types

KAnnotatedElement

interface KAnnotatedElement

Represents an annotated element and allows to obtain its annotations. See the Kotlin language documentation for more information.

KCallable

interface KCallable<out R> : KAnnotatedElement

Represents a callable entity, such as a function or a property.

KClass

interface KClass<T : Any> : 
    KDeclarationContainer, 
    KAnnotatedElement, 
    KClassifier

Represents a class and provides introspection capabilities. Instances of this class are obtainable by the ::class syntax. See the Kotlin language documentation for more information.

KClassifier

interface KClassifier

A classifier is either a class or a type parameter.

KDeclarationContainer

interface KDeclarationContainer

Represents an entity which may contain declarations of any other entities, such as a class or a package.

KFunction

interface KFunction<out R> : KCallable<R>, Function<R>

Represents a function with introspection capabilities.

KMutableProperty

interface KMutableProperty<R> : KProperty<R>

Represents a property declared as a var.

KMutableProperty0

interface KMutableProperty0<R> : 
    KProperty0<R>, 
    KMutableProperty<R>

Represents a var-property without any kind of receiver.

KMutableProperty1

interface KMutableProperty1<T, R> : 
    KProperty1<T, R>, 
    KMutableProperty<R>

Represents a var-property, operations on which take one receiver as a parameter.

KMutableProperty2

interface KMutableProperty2<D, E, R> : 
    KProperty2<D, E, R>, 
    KMutableProperty<R>

Represents a var-property, operations on which take two receivers as parameters.

KParameter

interface KParameter : KAnnotatedElement

Represents a parameter passed to a function or a property getter/setter, including this and extension receiver parameters.

KProperty

interface KProperty<out R> : KCallable<R>

Represents a property, such as a named val or var declaration. Instances of this class are obtainable by the :: operator.

KProperty0

interface KProperty0<out R> : KProperty<R>, () -> R

Represents a property without any kind of receiver. Such property is either originally declared in a receiverless context such as a package, or has the receiver bound to it.

KProperty1

interface KProperty1<T, out R> : KProperty<R>, (T) -> R

Represents a property, operations on which take one receiver as a parameter.

KProperty2

interface KProperty2<D, E, out R> : KProperty<R>, (D, E) -> R

Represents a property, operations on which take two receivers as parameters, such as an extension property declared in a class.

KType

interface KType

Represents a type. Type is usually either a class with optional type arguments, or a type parameter of some declaration, plus nullability.

KTypeParameter

interface KTypeParameter : KClassifier

Represents a declaration of a type parameter of a class or a callable. See the Kotlin language documentation for more information.

KTypeProjection

data class KTypeProjection

Represents a type projection. Type projection is usually the argument to another type in a type usage. For example, in the type Array<out Number>, out Number is the covariant projection of the type represented by the class Number.

KVariance

enum class KVariance

Represents variance applied to a type parameter on the declaration site (declaration-site variance), or to a type in a projection (use-site variance).

KVisibility

enum class KVisibility

Visibility is an aspect of a Kotlin declaration regulating where that declaration is accessible in the source code. Visibility can be changed with one of the following modifiers: public, protected, internal, private.

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect/index.html