OptIn
@Target([AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE, AnnotationTarget.TYPEALIAS]) annotation class 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
.
Constructors
<init>
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.
OptIn(vararg markerClass: KClass<out Annotation>)
Properties
markerClass
vararg val markerClass: Array<out KClass<out Annotation>>