Annotation Type Format
- 
@Documented @Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER}) @SubtypeOf(UnknownFormat.class) public @interface FormatThis annotation, attached to a String type, indicates that the String may be passed toFormatter.formatand similar methods.The annotation's value represents the valid arguments that may be passed to the format method. For example:
The annotation indicates that the format string requires any Object as the first parameter (@Format({GENERAL, INT}) String f = "String '%s' has length %d"; String.format(f, "Example", 7);ConversionCategory.GENERAL) and an integer as the second parameter (ConversionCategory.INT). The format string accepts any values as additional parameters (because it ignores them).- See Also:
 ConversionCategory- See the Checker Framework Manual:
 - Format String Checker
 
 
- 
- 
Required Element Summary
Required Elements Modifier and Type Required Element Description ConversionCategory[]valueAn array ofConversionCategory, indicating the types of legal remaining arguments when a value of the annotated type is used as the first argument toFormatter.formatand similar methods. 
 - 
 
- 
- 
Element Detail
- 
value
ConversionCategory[] value
An array ofConversionCategory, indicating the types of legal remaining arguments when a value of the annotated type is used as the first argument toFormatter.formatand similar methods.- Returns:
 - types that can be used as values when a value of this type is the format string
 
 
 - 
 
 -