Annotation Type FormatString
-
@Documented @Retention(CLASS) @Target(PARAMETER) public @interface FormatString
Annotation for method parameter declarations which denotes that actual parameters will be used as a format string in printf-style formatting.This is an optional annotation used along with the
FormatMethodannotation to denote which parameter in a format method is the format string. All parameters after the format string are assumed to be printf-style arguments for the format string. For example, the following snippet declares thatlogMessagewill be used as a format string withargspassed as arguments to the format string:public class Foo { @FormatMethod void doBarAndLogFailure(@FormatString String logMessage, Object... args) {...} }See
FormatMethodfor more information.