ExemptionReason

Explains why a watchdog exemption annotation is applied.

Every exemption annotation in this package carries a reason and a free-form description. The library-api-watchdog compiler plugin requires the explanation to be meaningful: the description may be left empty only when the reason explains the exemption on its own (FOR_BACKWARDS_COMPATIBILITY, API_DESIGN). The other reasons only categorize the exemption and keep the description shorter - the specific constraint still has to be spelled out there.

See Exemptions and internal API for how reasons and descriptions are validated.

Entries

Link copied to clipboard

The exempted shape is kept to stay compatible with existing users.

Link copied to clipboard

The exempted shape is a deliberate part of the API design.

Link copied to clipboard

The exempted shape is dictated by interoperability with another language, platform, or framework. Which interop constraint applies is not obvious from the entry alone, so the description must still name it.

Link copied to clipboard

The exempted shape mirrors an externally defined contract - a specification, a protocol, or a closed real-world domain. Which contract is mirrored is not obvious from the entry alone, so the description must still name it.

Link copied to clipboard

The exempted declaration deliberately ignores Java interoperability. This reason marks the handful of spots where Java ergonomics are knowingly sacrificed - a library that doesn't support Java callers at all disables the Java-interop diagnostics wholesale in its build configuration instead. Why this particular declaration gets to ignore Java callers is not obvious from the entry alone, so the description must still explain it.

Link copied to clipboard

None of the other entries fits. This is the default, and it explains nothing by itself, so the exemption annotation must spell the motivation out in its description.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

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

Link copied to clipboard

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