类 Jsr310DateTimeFormatAnnotationFormatterFactory
java.lang.Object
cn.taketoday.context.support.EmbeddedValueResolutionSupport
cn.taketoday.format.datetime.standard.Jsr310DateTimeFormatAnnotationFormatterFactory
public class Jsr310DateTimeFormatAnnotationFormatterFactory
extends EmbeddedValueResolutionSupport
implements AnnotationFormatterFactory<DateTimeFormat>
Formats fields annotated with the
DateTimeFormat annotation using the
JSR-310 java.time package in JDK 8.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller, Sam Brannen, Kazuki Shimizu
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明The types of fields that may be annotated with the <A> annotation.protected DateTimeFormattergetFormatter(DateTimeFormat annotation, Class<?> fieldType) Factory method used to create aDateTimeFormatter.Parser<?>getParser(DateTimeFormat annotation, Class<?> fieldType) Get the Parser to parse a submitted value for a field offieldTypeannotated withannotation.Printer<?>getPrinter(DateTimeFormat annotation, Class<?> fieldType) Get the Printer to print the value of a field offieldTypeannotated withannotation.从类继承的方法 cn.taketoday.context.support.EmbeddedValueResolutionSupport
resolveEmbeddedValue, setEmbeddedValueResolver
-
构造器详细资料
-
Jsr310DateTimeFormatAnnotationFormatterFactory
public Jsr310DateTimeFormatAnnotationFormatterFactory()
-
-
方法详细资料
-
getFieldTypes
从接口复制的说明:AnnotationFormatterFactoryThe types of fields that may be annotated with the <A> annotation. -
getPrinter
从接口复制的说明:AnnotationFormatterFactoryGet the Printer to print the value of a field offieldTypeannotated withannotation.If the type T the printer accepts is not assignable to
fieldType, a coercion fromfieldTypeto T will be attempted before the Printer is invoked.- 指定者:
getPrinter在接口中AnnotationFormatterFactory<DateTimeFormat>- 参数:
annotation- the annotation instancefieldType- the type of field that was annotated- 返回:
- the printer
-
getParser
从接口复制的说明:AnnotationFormatterFactoryGet the Parser to parse a submitted value for a field offieldTypeannotated withannotation.If the object the parser returns is not assignable to
fieldType, a coercion tofieldTypewill be attempted before the field is set.- 指定者:
getParser在接口中AnnotationFormatterFactory<DateTimeFormat>- 参数:
annotation- the annotation instancefieldType- the type of field that was annotated- 返回:
- the parser
-
getFormatter
Factory method used to create aDateTimeFormatter.- 参数:
annotation- the format annotation for the fieldfieldType- the declared type of the field- 返回:
- a
DateTimeFormatterinstance
-