ExperimentalReflectionOnLambdas

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
(source)

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 -opt-in=kotlin.reflect.jvm.ExperimentalReflectionOnLambdas.

Constructors

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

JVM
1.0

annotationClass

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

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