java.lang.Object | ||
↳ | org.springframework.core.convert.support.GenericConversionService | |
↳ | org.springframework.format.support.FormattingConversionService |
Known Direct Subclasses |
A ConversionService
implementation
designed to be configured as a FormatterRegistry
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a Formatter to format fields of a specific type.
| |||||||||||
Adds a Formatter to format fields of the given type.
| |||||||||||
Adds a Printer/Parser pair to format fields of a specific type.
| |||||||||||
Set the StringValueResolver to use for resolving embedded definition values.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.core.convert.support.GenericConversionService
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.EmbeddedValueResolverAware
| |||||||||||
From interface
org.springframework.core.convert.ConversionService
| |||||||||||
From interface
org.springframework.core.convert.converter.ConverterRegistry
| |||||||||||
From interface
org.springframework.format.FormatterRegistry
|
Adds a Formatter to format fields of a specific type. The field type is implied by the parameterized Formatter instance.
formatter | the formatter to add |
---|
Adds a Formatter to format fields of the given type.
On print, if the Formatter's type T is declared and fieldType
is not assignable to T,
a coersion to T will be attempted before delegating to formatter
to print a field value.
On parse, if the parsed object returned by formatter
is not assignable to the runtime field type,
a coersion to the field type will be attempted before returning the parsed field value.
fieldType | the field type to format |
---|---|
formatter | the formatter to add |
Adds a Printer/Parser pair to format fields of a specific type.
The formatter will delegate to the specified printer
for printing
and the specified parser
for parsing.
On print, if the Printer's type T is declared and fieldType
is not assignable to T,
a coersion to T will be attempted before delegating to printer
to print a field value.
On parse, if the object returned by the Parser is not assignable to the runtime field type,
a coersion to the field type will be attempted before returning the parsed field value.
fieldType | the field type to format |
---|---|
printer | the printing part of the formatter |
parser | the parsing part of the formatter |
Set the StringValueResolver to use for resolving embedded definition values.