RequiresOptIn.Level

enum 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.

    Enum Values

    ERROR

    @NonNull
    @NonNull RequiresOptIn.Level RequiresOptIn.Level.ERROR

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

    WARNING

    @NonNull
    @NonNull RequiresOptIn.Level RequiresOptIn.Level.WARNING

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