ExperimentalReflectionOnLambdas

Platform and version requirements: JVM (1.5)
@Target([AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS]) annotation class ExperimentalReflectionOnLambdas

This annotation marks the experimental kotlin-reflect API that allows to approximate a Kotlin lambda or a function expression instance to a KFunction instance. The behavior of this API may be changed or the API may be removed completely in any further release.

Any usage of a declaration annotated with @ExperimentalReflectionOnLambdas should be accepted either by annotating that usage with the OptIn annotation, e.g. @OptIn(ExperimentalReflectionOnLambdas::class), or by using the compiler argument -Xopt-in=kotlin.reflect.jvm.ExperimentalReflectionOnLambdas.

Constructors

Platform and version requirements: JVM (1.0)

<init>

This annotation marks the experimental kotlin-reflect API that allows to approximate a Kotlin lambda or a function expression instance to a KFunction instance. The behavior of this API may be changed or the API may be removed completely in any further release.

ExperimentalReflectionOnLambdas()

Extension Properties

Platform and version requirements: JVM (1.0)

annotationClass

Returns a KClass instance corresponding to the annotation type of this annotation.

val <T : Annotation> T.annotationClass: KClass<out T>

© 2010–2021 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.jvm/-experimental-reflection-on-lambdas/index.html