Formatter.format and similar methods.
The annotation's value represents the valid arguments that may be passed to the format method. For example:
@Format({GENERAL, INT}) String f = "String '%s' has length %d";
String.format(f, "Example", 7);
The annotation indicates that the format string requires any Object as the first parameter
(ConversionCategory#GENERAL) and an integer as the second parameter (ConversionCategory#INT). The format string accepts any values as additional parameters (because
it ignores them).
ConversionCategory
| Modifier and Type | Method and Description |
|---|---|
| public ConversionCategory[] | Returns: types that can be used as values when a value of this type is the format stringAn array of |
| value | back to summary |
|---|---|
| public ConversionCategory[] value() An array of
| |