@Retention(value = AnnotationRetention.BINARY)
@Target(allowedTargets = [AnnotationTarget.CLASSAnnotationTarget.PROPERTYAnnotationTarget.LOCAL_VARIABLEAnnotationTarget.VALUE_PARAMETERAnnotationTarget.CONSTRUCTORAnnotationTarget.FUNCTIONAnnotationTarget.PROPERTY_GETTERAnnotationTarget.PROPERTY_SETTERAnnotationTarget.FILEAnnotationTarget.TYPEALIAS])
@Target(value = [ElementType.CONSTRUCTORElementType.FIELDElementType.LOCAL_VARIABLEElementType.METHODElementType.PACKAGEElementType.TYPE])
public annotation OptIn


Allows use of an opt-in 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.

Summary

Public constructors

OptIn(@NonNull KClass<@NonNull Annotation>... markerClass)

Public methods

final @NonNull KClass[]

Defines the opt-in API(s) whose usage this annotation allows.

Public constructors

OptIn

public OptIn(@NonNull KClass<@NonNull Annotation>... markerClass)

Public methods

getMarkerClass

public final @NonNull KClass[] getMarkerClass()

Defines the opt-in API(s) whose usage this annotation allows.