类 DefaultConversionService
java.lang.Object
cn.taketoday.core.conversion.support.GenericConversionService
cn.taketoday.core.conversion.support.DefaultConversionService
A specialization of
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.
- 从以下版本开始:
- 3.0
- 作者:
- Chris Beams, Juergen Hoeller, Stephane Nicoll, Harry Yang
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidaddCollectionConverters(ConverterRegistry converterRegistry) Add common collection converters.static voidaddDefaultConverters(ConverterRegistry converterRegistry) Add converters appropriate for most environments.private static voidaddScalarConverters(ConverterRegistry converterRegistry) static DefaultConversionServiceReturn a shared defaultConversionServiceinstance, lazily building it once needed.从类继承的方法 cn.taketoday.core.conversion.support.GenericConversionService
addConverter, addConverter, addConverter, addConverterFactory, canBypassConvert, canConvert, canConvert, convert, convert, convert, convertNullSource, getConverter, getDefaultConverter, removeConvertible, toString从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 cn.taketoday.core.conversion.ConversionService
getConverter, getConverter, getConverter, getConverter
-
字段详细资料
-
构造器详细资料
-
DefaultConversionService
public DefaultConversionService()Create a newDefaultConversionServicewith the set of default converters.
-
-
方法详细资料
-
addDefaultConverters
Add converters appropriate for most environments.- 参数:
converterRegistry- the registry of converters to add to (must also be castable to ConversionService, e.g. being aConfigurableConversionService)- 抛出:
ClassCastException- if the given ConverterRegistry could not be cast to a ConversionService
-
addCollectionConverters
Add common collection converters.- 参数:
converterRegistry- the registry of converters to add to (must also be castable to ConversionService, e.g. being aConfigurableConversionService)- 抛出:
ClassCastException- if the given ConverterRegistry could not be cast to a ConversionService
-
addScalarConverters