public abstract class AbstractLocalDateTimeFormatConvertor<T extends java.time.temporal.Temporal> extends FormatConvertor<T>
带格式支持的日期转换器,在属性字段上使用@DateFormat来指定格式.
logger| 构造器和说明 |
|---|
AbstractLocalDateTimeFormatConvertor(ToStringConvertor<T> convertor) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract T |
convert(java.lang.String value,
java.time.format.DateTimeFormatter formatter) |
protected T |
formatToObject(java.lang.String value,
FormatType<T> genericType)
字符串转换为对象
|
protected java.lang.String |
formatToString(T value,
FormatType<T> genericType)
对象转换为字符串
|
doToObject, doToString, getConvertor, supportForgetPolicy, getSourceType, getTargetType, setPolicy, sourceToTarget, targetToSourcepublic AbstractLocalDateTimeFormatConvertor(ToStringConvertor<T> convertor)
convertor - convertorprotected abstract T convert(java.lang.String value, java.time.format.DateTimeFormatter formatter)
protected java.lang.String formatToString(T value, FormatType<T> genericType)
对象转换为字符串
formatToString 在类中 FormatConvertor<T extends java.time.temporal.Temporal>value - 对象genericType - 指定对象的上下文属性protected T formatToObject(java.lang.String value, FormatType<T> genericType)
字符串转换为对象
formatToObject 在类中 FormatConvertor<T extends java.time.temporal.Temporal>value - 字符串genericType - 指定对象的上下文属性