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
FormatMethod
annotation 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 thatlogMessage
will be used as a format string withargs
passed as arguments to the format string:public class Foo { @FormatMethod void doBarAndLogFailure(@FormatString String logMessage, Object... args) {...} }
See
FormatMethod
for more information.