Annotation Interface ReturnsFormat


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface ReturnsFormat
Attach this annotation to a method with the following properties:
  • The first parameter is a format string.
  • The second parameter is a vararg that takes conversion categories.
  • The method throws an exception if the format string's format specifiers do not match the passed conversion categories.
  • On success, the method returns the passed format string unmodified.
An example is FormatUtil#asFormat().
See the Checker Framework Manual:
Format String Checker