Top Description Inners Fields Constructors Methods
org.springframework.format.support

public Class FormattingConversionService

extends GenericConversionService
implements FormatterRegistry, EmbeddedValueResolverAware
Class Inheritance
All Implemented Interfaces
org.springframework.context.EmbeddedValueResolverAware, org.springframework.beans.factory.Aware, org.springframework.format.FormatterRegistry, org.springframework.core.convert.converter.ConverterRegistry
Known Direct Subclasses
org.springframework.format.support.DefaultFormattingConversionService
Imports
java.lang.annotation.Annotation, java.util.Collections, .Map, .Set, java.util.concurrent.ConcurrentHashMap, org.springframework.context.EmbeddedValueResolverAware, org.springframework.context.i18n.LocaleContextHolder, org.springframework.core.DecoratingProxy, .GenericTypeResolver, org.springframework.core.convert.ConversionService, .TypeDescriptor, org.springframework.core.convert.converter.ConditionalGenericConverter, .GenericConverter, org.springframework.core.convert.support.GenericConversionService, org.springframework.format.AnnotationFormatterFactory, .Formatter, .FormatterRegistry, .Parser, .Printer, org.springframework.lang.Nullable, org.springframework.util.Assert, .ClassUtils, .StringUtils, .StringValueResolver

A org.springframework.core.convert.ConversionService implementation designed to be configured as a FormatterRegistry.
Authors
Keith Donald, Juergen Hoeller
Since
3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private class
private class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final Map<FormattingConversionService.AnnotationConverterKey, GenericConverter>
private final Map<FormattingConversionService.AnnotationConverterKey, GenericConverter>
private StringValueResolver

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addFormatter(Formatter<?>
the formatter to add
formatter
)

Implements org.springframework.format.FormatterRegistry.addFormatter.

Adds a Formatter to format fields of a specific type.
public void
addFormatterForFieldAnnotation(AnnotationFormatterFactory<? extends Annotation>
the annotation formatter factory to add
annotationFormatterFactory
)

Implements org.springframework.format.FormatterRegistry.addFormatterForFieldAnnotation.

Adds a Formatter to format fields annotated with a specific format annotation.
public void
addFormatterForFieldType(Class<?>
the field type to format
fieldType
,
Formatter<?>
the formatter to add
formatter
)

Implements org.springframework.format.FormatterRegistry.addFormatterForFieldType.

Adds a Formatter to format fields of the given type.
public void
addFormatterForFieldType(Class<?>
the field type to format
fieldType
,
Printer<?>
the printing part of the formatter
printer
,
Parser<?>
the parsing part of the formatter
parser
)

Implements org.springframework.format.FormatterRegistry.addFormatterForFieldType.

Adds a Printer/Parser pair to format fields of a specific type.
public void
addParser(Parser<?>
the parser to add
parser
)

Implements org.springframework.format.FormatterRegistry.addParser.

Adds a Parser to parse fields of a specific type.
public void
addPrinter(Printer<?>
the printer to add
printer
)

Implements org.springframework.format.FormatterRegistry.addPrinter.

Adds a Printer to print fields of a specific type.
pack-priv static Class<? extends Annotation>
pack-priv static Class<?>
getFieldType(Formatter<?> formatter)

private static <T> Class<?>
getFieldType(T instance, Class<T> genericInterface)

public void
setEmbeddedValueResolver(StringValueResolver resolver)

Implements org.springframework.context.EmbeddedValueResolverAware.setEmbeddedValueResolver.

Set the StringValueResolver to use for resolving embedded definition values.
Inherited from org.springframework.core.convert.support.GenericConversionService:
addConverteraddConverteraddConverteraddConverterFactorycanBypassConvertcanConvertcanConvertconvertconvertconvertNullSourcegetConvertergetDefaultConverterremoveConvertibletoString