Package | Description |
---|---|
org.springframework.format |
An API for defining Formatters to format field model values for display in a UI.
|
org.springframework.format.datetime |
Formatters for
java.util.Date properties. |
org.springframework.format.datetime.joda |
Integration with Joda-Time for formatting Joda date and time types as well as standard JDK Date types.
|
org.springframework.format.datetime.standard |
Integration with the JSR-310
java.time package in JDK 8. |
org.springframework.format.number |
Formatters for
java.lang.Number properties. |
org.springframework.format.number.money |
Integration with the JSR-354
javax.money package. |
org.springframework.format.support |
Support classes for the formatting package,
providing common implementations as well as adapters.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Formatter<T>
Formats objects of type T.
|
Modifier and Type | Method and Description |
---|---|
Printer<?> |
AnnotationFormatterFactory.getPrinter(A annotation,
Class<?> fieldType)
Get the Printer to print the value of a field of
fieldType annotated with
annotation . |
Modifier and Type | Method and Description |
---|---|
void |
FormatterRegistry.addFormatterForFieldType(Class<?> fieldType,
Printer<?> printer,
Parser<?> parser)
Adds a Printer/Parser pair to format fields of a specific type.
|
void |
FormatterRegistry.addPrinter(Printer<?> printer)
Adds a Printer to print fields of a specific type.
|
Modifier and Type | Class and Description |
---|---|
class |
DateFormatter
A formatter for
Date types. |
Modifier and Type | Method and Description |
---|---|
Printer<?> |
DateTimeFormatAnnotationFormatterFactory.getPrinter(DateTimeFormat annotation,
Class<?> fieldType) |
Modifier and Type | Class and Description |
---|---|
class |
MillisecondInstantPrinter
Prints Long instances using a Joda
DateTimeFormatter . |
class |
ReadableInstantPrinter
Prints Joda-Time
ReadableInstant instances using a DateTimeFormatter . |
class |
ReadablePartialPrinter
Prints Joda-Time
ReadablePartial instances using a DateTimeFormatter . |
Modifier and Type | Method and Description |
---|---|
Printer<?> |
JodaDateTimeFormatAnnotationFormatterFactory.getPrinter(DateTimeFormat annotation,
Class<?> fieldType) |
Modifier and Type | Class and Description |
---|---|
class |
InstantFormatter
Formatter implementation for a JSR-310 Instant ,
following JSR-310's parsing rules for an Instant (that is, not using a
configurable DateTimeFormatter ): accepting the
default ISO_INSTANT format as well as RFC_1123_DATE_TIME
(which is commonly used for HTTP date header values), as of Spring 4.3. |
class |
TemporalAccessorPrinter
Printer implementation for a JSR-310 TemporalAccessor ,
using a DateTimeFormatter ) (the contextual one, if available). |
Modifier and Type | Method and Description |
---|---|
Printer<?> |
Jsr310DateTimeFormatAnnotationFormatterFactory.getPrinter(DateTimeFormat annotation,
Class<?> fieldType) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractNumberFormatter
Abstract formatter for Numbers,
providing a
AbstractNumberFormatter.getNumberFormat(java.util.Locale) template method. |
class |
CurrencyStyleFormatter
A BigDecimal formatter for number values in currency style.
|
class |
NumberStyleFormatter
A general-purpose number formatter using NumberFormat's number style.
|
class |
PercentStyleFormatter
A formatter for number values in percent style.
|
Modifier and Type | Method and Description |
---|---|
Printer<Number> |
NumberFormatAnnotationFormatterFactory.getPrinter(NumberFormat annotation,
Class<?> fieldType) |
Modifier and Type | Class and Description |
---|---|
class |
CurrencyUnitFormatter
Formatter for JSR-354
CurrencyUnit values,
from and to currency code Strings. |
class |
MonetaryAmountFormatter
Formatter for JSR-354
MonetaryAmount values,
delegating to MonetaryAmountFormat.format(javax.money.MonetaryAmount)
and MonetaryAmountFormat.parse(java.lang.CharSequence) . |
Modifier and Type | Method and Description |
---|---|
Printer<javax.money.MonetaryAmount> |
Jsr354NumberFormatAnnotationFormatterFactory.getPrinter(NumberFormat annotation,
Class<?> fieldType) |
Modifier and Type | Method and Description |
---|---|
void |
FormattingConversionService.addFormatterForFieldType(Class<?> fieldType,
Printer<?> printer,
Parser<?> parser) |
void |
FormattingConversionService.addPrinter(Printer<?> printer) |