KAnnotatedElement

Common
JVM
JS
Native
1.0
interface KAnnotatedElement

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

Properties

Common
JVM
JS
Native
1.0

annotations

Annotations which are present on this element.

abstract val annotations: List<Annotation>

Extension Functions

JVM
1.1

findAnnotation

Returns an annotation of the given type on this element.

fun <T : Annotation> KAnnotatedElement.findAnnotation(): T?

Inheritors

KCallable

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

Common
1.0
interface KCallable<out R>
JVM
JS
Native
1.0
interface KCallable<out R> : KAnnotatedElement

KClass

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.

Common
1.0
interface KClass<T : Any>
JVM
JS
Native
1.0
interface KClass<T : Any> : 
    KDeclarationContainer,
    KAnnotatedElement,
    KClassifier
Common
JVM
JS
Native
1.0

KParameter

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

interface KParameter : KAnnotatedElement

KType

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

Common
JVM
JS
1.0
interface KType : KAnnotatedElement
Native
1.3
interface KType