接口的使用
cn.taketoday.format.Formatter
使用Formatter的程序包
程序包
说明
An API for defining Formatters to format field model values for display in a UI.
Formatters for
java.util.Date properties.Integration with the JSR-310
java.time package in JDK 8.Formatters for
java.lang.Number properties.Integration with the JSR-354
javax.money package.Support classes for the formatting package,
providing common implementations as well as adapters.
Provides data binding and validation functionality,
for usage in business and/or UI layers.
-
cn.taketoday.format中Formatter的使用
参数类型为Formatter的cn.taketoday.format中的方法修饰符和类型方法说明voidFormatterRegistry.addFormatter(Formatter<?> formatter) Adds a Formatter to format fields of a specific type.voidFormatterRegistry.addFormatterForFieldType(Class<?> fieldType, Formatter<?> formatter) Adds a Formatter to format fields of the given type. -
cn.taketoday.format.datetime中Formatter的使用
修饰符和类型方法说明DateTimeFormatAnnotationFormatterFactory.getFormatter(DateTimeFormat annotation, Class<?> fieldType) -
cn.taketoday.format.datetime.standard中Formatter的使用
修饰符和类型类说明classFormatterimplementation for a JSR-310Instant, following JSR-310's parsing rules for an Instant (that is, not using a configurableDateTimeFormatter): accepting the defaultISO_INSTANTformat as well asRFC_1123_DATE_TIME(which is commonly used for HTTP date header values) -
cn.taketoday.format.number中Formatter的使用
修饰符和类型类说明classAbstract formatter for Numbers, providing aAbstractNumberFormatter.getNumberFormat(Locale)template method.classA BigDecimal formatter for number values in currency style.classA general-purpose number formatter using NumberFormat's number style.classA formatter for number values in percent style. -
cn.taketoday.format.number.money中Formatter的使用
修饰符和类型类说明classFormatter for JSR-354CurrencyUnitvalues, from and to currency code Strings.classFormatter for JSR-354MonetaryAmountvalues, delegating toMonetaryAmountFormat.format(javax.money.MonetaryAmount)andMonetaryAmountFormat.parse(java.lang.CharSequence). -
cn.taketoday.format.support中Formatter的使用
参数类型为Formatter的cn.taketoday.format.support中的方法修饰符和类型方法说明voidApplicationConversionService.addFormatter(Formatter<?> formatter) voidFormattingConversionService.addFormatter(Formatter<?> formatter) voidApplicationConversionService.addFormatterForFieldType(Class<?> fieldType, Formatter<?> formatter) voidFormattingConversionService.addFormatterForFieldType(Class<?> fieldType, Formatter<?> formatter) 参数类型为Formatter的cn.taketoday.format.support中的构造器限定符构造器说明FormatterPropertyEditorAdapter(Formatter<?> formatter) Create a newFormatterPropertyEditorAdapterfor the givenFormatter. -
cn.taketoday.validation中Formatter的使用
参数类型为Formatter的cn.taketoday.validation中的方法修饰符和类型方法说明voidDataBinder.addCustomFormatter(Formatter<?> formatter) Add a custom formatter, applying it to all fields matching theFormatter-declared type.voidDataBinder.addCustomFormatter(Formatter<?> formatter, Class<?>... fieldTypes) Add a custom formatter, applying it to the specified field types only, if any, or otherwise to all fields matching theFormatter-declared type.voidDataBinder.addCustomFormatter(Formatter<?> formatter, String... fields) Add a custom formatter for the field type specified inFormatterclass, applying it to the specified fields only, if any, or otherwise to all fields.