Annotation Interface SuppressForbidden


@Retention(CLASS) @Target({CONSTRUCTOR,FIELD,LOCAL_VARIABLE,METHOD,TYPE}) public @interface SuppressForbidden
Indicate to code checkers that the annotated usage of a forbidden API should be allowed even if there is a policy forbidding it.

A valid reason must be given for this kind of exception; therefore, the reason element is required.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the reason for allowing a forbidden API in the annotated element.
  • Element Details

    • reason

      String reason
      Returns the reason for allowing a forbidden API in the annotated element.
      Returns:
      the reason for allowing a forbidden API in the annotated element