RequiresOptIn.Level


public enum RequiresOptIn.Level extends Enum


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 methods

    final @NonNull EnumEntries<@NonNull 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:

    final @NonNull RequiresOptIn.Level

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

    final @NonNull RequiresOptIn.Level[]

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

    Enum Values

    ERROR

    RequiresOptIn.Level RequiresOptIn.Level.ERROR

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

    WARNING

    RequiresOptIn.Level RequiresOptIn.Level.WARNING

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

    Public methods

    getEntries

    public final @NonNull EnumEntries<@NonNull RequiresOptIn.LevelgetEntries()

    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

    valueOf

    Added in 1.1.0
    public final @NonNull RequiresOptIn.Level valueOf(@NonNull String value)

    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

    Added in 1.1.0
    public final @NonNull RequiresOptIn.Level[] values()

    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.