OptIn

Allows to use the API denoted by the given markers in the annotated file, declaration, or expression. If a declaration is annotated with OptIn, its usages are not required to opt in to that API.

This class requires opt-in itself and can only be used with the compiler argument -Xopt-in=kotlin.RequiresOptIn.

Since Kotlin

1.3

Constructors

OptIn
Link copied to clipboard
fun OptIn(vararg markerClass: KClass<out Annotation>)

Properties

markerClass
Link copied to clipboard
val markerClass: Array<out KClass<out Annotation>>