@Documented @Retention(value=CLASS) @Target(value=PARAMETER) public @interface FormatString
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 that logMessage
will be used as a format string with args
passed
as arguments to the format string:
public class Foo {
@FormatMethod void doBarAndLogFailure(@FormatString String logMessage,
Object... args) {...}
}
See FormatMethod
for more information.
Copyright © 2018. All rights reserved.