RequiresOptIn.Level


Severity of the diagnostic that should be reported on usages of opt-in API which did not explicitly accept the opt-in aspect of that API either by:

  • Propagating the opt-in aspect by annotating the usage with the marker annotation, thus becoming part of the marked opt-in API surface or
  • Suppressing propagation of the opt-in aspect by annotating the usage with [OptIn] and specifying the marker annotation

    Summary

    Enum Values

    ERROR

    Specifies that an error should be reported on incorrect usages of this opt-in API.

    WARNING

    Specifies that a warning should be reported on incorrect usages of this opt-in API.

    Public functions

    RequiresOptIn.Level
    valueOf(value: String)

    Returns the enum constant of this type with the specified name.

    android
    Array<RequiresOptIn.Level>

    Returns an array containing the constants of this enum type, in the order they're declared.

    android

    Enum Values

    ERROR

    val RequiresOptIn.Level.ERRORRequiresOptIn.Level

    Specifies that an error should be reported on incorrect usages of this opt-in API.

    WARNING

    val RequiresOptIn.Level.WARNINGRequiresOptIn.Level

    Specifies that a warning should be reported on incorrect usages of this opt-in API.

    Public functions

    valueOf

    fun valueOf(value: String): RequiresOptIn.Level

    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

    Throws
    kotlin.IllegalArgumentException

    if this enum type has no constant with the specified name

    values

    fun values(): Array<RequiresOptIn.Level>

    Returns an array containing the constants of this enum type, in the order they're declared.

    This method may be used to iterate over the constants.