类 DefaultFormattingConversionService
java.lang.Object
cn.taketoday.core.conversion.support.GenericConversionService
cn.taketoday.format.support.FormattingConversionService
cn.taketoday.format.support.DefaultFormattingConversionService
- 所有已实现的接口:
Aware,EmbeddedValueResolverAware,cn.taketoday.core.conversion.ConversionService,cn.taketoday.core.conversion.ConverterRegistry,cn.taketoday.core.conversion.support.ConfigurableConversionService,FormatterRegistry
A specialization of
FormattingConversionService configured by default with
converters and formatters appropriate for most applications.
Designed for direct instantiation but also exposes the static addDefaultFormatters(cn.taketoday.format.FormatterRegistry)
utility method for ad hoc use against any FormatterRegistry instance, just
as DefaultConversionService exposes its own
addDefaultConverters method.
Automatically registers formatters for JSR-354 Money & Currency, JSR-310 Date-Time and/or Joda-Time 2.x, depending on the presence of the corresponding API on the classpath.
- 从以下版本开始:
- 4.0
- 作者:
- Chris Beams, Juergen Hoeller, Harry Yang
-
字段概要
字段 -
构造器概要
构造器构造器说明Create a newDefaultFormattingConversionServicewith the set of default converters and default formatters.DefaultFormattingConversionService(boolean registerDefaultFormatters) Create a newDefaultFormattingConversionServicewith the set of default converters and, based on the value ofregisterDefaultFormatters, the set of default formatters.DefaultFormattingConversionService(cn.taketoday.core.StringValueResolver embeddedValueResolver, boolean registerDefaultFormatters) Create a newDefaultFormattingConversionServicewith the set of default converters and, based on the value ofregisterDefaultFormatters, the set of default formatters. -
方法概要
修饰符和类型方法说明static voidaddDefaultFormatters(FormatterRegistry formatterRegistry) Add formatters appropriate for most environments: including number formatters, JSR-354 Money & Currency formatters, JSR-310 Date-Time and/or Joda-Time formatters, depending on the presence of the corresponding API on the classpath.从类继承的方法 cn.taketoday.format.support.FormattingConversionService
addFormatter, addFormatterForFieldAnnotation, addFormatterForFieldType, addFormatterForFieldType, addParser, addPrinter, setEmbeddedValueResolver从类继承的方法 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从接口继承的方法 cn.taketoday.core.conversion.ConverterRegistry
addConverter, addConverter, addConverter, addConverterFactory, removeConvertible
-
字段详细资料
-
jsr354Present
protected static final boolean jsr354Present
-
-
构造器详细资料
-
DefaultFormattingConversionService
public DefaultFormattingConversionService()Create a newDefaultFormattingConversionServicewith the set of default converters and default formatters. -
DefaultFormattingConversionService
public DefaultFormattingConversionService(boolean registerDefaultFormatters) Create a newDefaultFormattingConversionServicewith the set of default converters and, based on the value ofregisterDefaultFormatters, the set of default formatters.- 参数:
registerDefaultFormatters- whether to register default formatters
-
DefaultFormattingConversionService
public DefaultFormattingConversionService(@Nullable cn.taketoday.core.StringValueResolver embeddedValueResolver, boolean registerDefaultFormatters) Create a newDefaultFormattingConversionServicewith the set of default converters and, based on the value ofregisterDefaultFormatters, the set of default formatters.- 参数:
embeddedValueResolver- delegated toFormattingConversionService.setEmbeddedValueResolver(StringValueResolver)prior to callingaddDefaultFormatters(cn.taketoday.format.FormatterRegistry).registerDefaultFormatters- whether to register default formatters
-
-
方法详细资料
-
addDefaultFormatters
Add formatters appropriate for most environments: including number formatters, JSR-354 Money & Currency formatters, JSR-310 Date-Time and/or Joda-Time formatters, depending on the presence of the corresponding API on the classpath.- 参数:
formatterRegistry- the service to register default formatters with
-