Retention

Common
JVM
JS
Native
1.0
@Target([AnnotationTarget.ANNOTATION_CLASS]) annotation class Retention
(Common source) (Native source)

This meta-annotation determines whether an annotation is stored in binary output and visible for reflection. By default, both are true.

Constructors

Common
JVM
JS
Native
1.0

<init>

This meta-annotation determines whether an annotation is stored in binary output and visible for reflection. By default, both are true.

<init>(
    value: AnnotationRetention = AnnotationRetention.RUNTIME)

Properties

Common
JVM
JS
Native
1.0

value

necessary annotation retention (RUNTIME, BINARY or SOURCE)

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>