T - 转换对象public abstract class FormatConvertor<T> extends AbstractToStringConvertor<T,FormatType<T>>
格式化转换器
logger| 构造器和说明 |
|---|
FormatConvertor(ToStringConvertor<T> convertor) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected T |
doToObject(java.lang.String value,
FormatType<T> genericType)
字符串转换为对象
|
protected java.lang.String |
doToString(T value,
FormatType<T> genericType)
对象转换为字符串
|
protected abstract T |
formatToObject(java.lang.String value,
FormatType<T> genericType)
字符串转换为对象
|
protected abstract java.lang.String |
formatToString(T value,
FormatType<T> genericType)
对象转换为字符串
|
ToStringConvertor<T> |
getConvertor()
返回convertor
|
protected boolean |
supportFor(cn.featherfly.common.lang.reflect.Type<T> generecType)
是否提供对传入类型的支持
|
getPolicy, getSourceType, getTargetType, setPolicy, sourceToTarget, targetToSourcepublic FormatConvertor(ToStringConvertor<T> convertor)
convertor - convertorprotected boolean supportFor(cn.featherfly.common.lang.reflect.Type<T> generecType)
是否提供对传入类型的支持
supportFor 在类中 AbstractToStringConvertor<T,FormatType<T>>generecType - generecTypeprotected java.lang.String doToString(T value, FormatType<T> genericType)
对象转换为字符串
doToString 在类中 AbstractToStringConvertor<T,FormatType<T>>value - 对象genericType - 指定对象的上下文属性protected T doToObject(java.lang.String value, FormatType<T> genericType)
字符串转换为对象
doToObject 在类中 AbstractToStringConvertor<T,FormatType<T>>value - 字符串genericType - 指定对象的上下文属性public ToStringConvertor<T> getConvertor()
protected abstract java.lang.String formatToString(T value, FormatType<T> genericType)
对象转换为字符串
value - 对象genericType - 指定对象的上下文属性protected abstract T formatToObject(java.lang.String value, FormatType<T> genericType)
字符串转换为对象
value - 字符串genericType - 指定对象的上下文属性