|
|
|
@ -29,6 +29,14 @@ import org.springframework.core.convert.converter.ConverterRegistry; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public interface FormatterRegistry extends ConverterRegistry { |
|
|
|
public interface FormatterRegistry extends ConverterRegistry { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Adds a Formatter to format fields of a specific type. |
|
|
|
|
|
|
|
* The field type is implied by the parameterized Formatter instance. |
|
|
|
|
|
|
|
* @param formatter the formatter to add |
|
|
|
|
|
|
|
* @see #addFormatterForFieldType(Class, Formatter) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void addFormatter(Formatter<?> formatter); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a Formatter to format fields of the given type. |
|
|
|
* Adds a Formatter to format fields of the given type. |
|
|
|
* <p>On print, if the Formatter's type T is declared and <code>fieldType</code> is not assignable to T, |
|
|
|
* <p>On print, if the Formatter's type T is declared and <code>fieldType</code> is not assignable to T, |
|
|
|
@ -40,14 +48,6 @@ public interface FormatterRegistry extends ConverterRegistry { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void addFormatterForFieldType(Class<?> fieldType, Formatter<?> formatter); |
|
|
|
void addFormatterForFieldType(Class<?> fieldType, Formatter<?> formatter); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Adds a Formatter to format fields of a specific type. |
|
|
|
|
|
|
|
* The field type is implied by the parameterized Formatter instance. |
|
|
|
|
|
|
|
* @param formatter the formatter to add |
|
|
|
|
|
|
|
* @see #addFormatterForFieldType(Class, Formatter) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void addFormatter(Formatter<?> formatter); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Adds a Printer/Parser pair to format fields of a specific type. |
|
|
|
* Adds a Printer/Parser pair to format fields of a specific type. |
|
|
|
* The formatter will delegate to the specified <code>printer</code> for printing |
|
|
|
* The formatter will delegate to the specified <code>printer</code> for printing |
|
|
|
|