|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Inherited
@Target(value={FIELD,METHOD,ANNOTATION_TYPE})
public @interface FormatIndicates that a parsed value is formatted and must be parsed before being assigned.
The Conversion type assigned to this field will depend on its type.
Multiple format masks can be tried for a single value.
When reading from this value (for writing to a given output), the first mask declared in formats() will be used to produce its String representation.
The options() is an optional configuration, with properties and values separated by =.. Each property will be used configure the underlying formatter. For example,
if the parsed value is a BigDecimal, and the format is '#0,00', the decimal separator must be set to ','. To specify this using the options() annotation, use:
Commonly used for java beans processed using BeanProcessor and/or BeanWriterProcessor
Conversion,
Conversions,
BeanProcessor,
BeanWriterProcessor| Required Element Summary | |
|---|---|
String[] |
formats
Formats that define how a value can be formatted. |
| Optional Element Summary | |
|---|---|
String[] |
options
Defines a sequence of properties and their values, used to configure the underlying formatter. |
| Element Detail |
|---|
public abstract String[] formats
public abstract String[] options
property_name=property_value,
e.g. options={"decimalSeparator=,", "maximumFractionDigits=3"}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||