public class DefaultConversionService extends GenericConversionService
GenericConversionService
configured by default with
converters appropriate for most environments.
Designed for direct instantiation but also exposes the static
addDefaultConverters(ConverterRegistry)
utility method for ad hoc use against any
ConverterRegistry
instance.
Constructor and Description |
---|
DefaultConversionService()
Create a new
DefaultConversionService with the set of
default converters. |
Modifier and Type | Method and Description |
---|---|
private static void |
addCollectionConverters(ConverterRegistry converterRegistry) |
static void |
addDefaultConverters(ConverterRegistry converterRegistry)
Add converters appropriate for most environments.
|
private static void |
addFallbackConverters(ConverterRegistry converterRegistry) |
private static void |
addScalarConverters(ConverterRegistry converterRegistry) |
addConverter, addConverter, addConverter, addConverterFactory, canBypassConvert, canConvert, canConvert, convert, convert, convert, convertNullSource, getConverter, getDefaultConverter, removeConvertible, toString
public DefaultConversionService()
DefaultConversionService
with the set of
default converters.public static void addDefaultConverters(ConverterRegistry converterRegistry)
converterRegistry
- the registry of converters to add to (must also be castable to ConversionService)java.lang.ClassCastException
- if the converterRegistry could not be cast to a ConversionServiceprivate static void addScalarConverters(ConverterRegistry converterRegistry)
private static void addCollectionConverters(ConverterRegistry converterRegistry)
private static void addFallbackConverters(ConverterRegistry converterRegistry)