T - the generic typepublic abstract class OptionalConvertor<T> extends AbstractConvertor<java.util.Optional,T,cn.featherfly.common.lang.reflect.Type<java.util.Optional>>
OptionalToStringConvertor
.logger| 构造器和说明 |
|---|
OptionalConvertor()
Instantiates a new optional convertor.
|
OptionalConvertor(java.util.Collection<Convertor<?,T>> convertors)
Instantiates a new optional convertor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addConvertor(Convertor convertors)
设置convertors.
|
void |
addConvertors(java.util.Collection<Convertor<?,T>> convertors)
设置convertors.
|
protected T |
doSourceToTarget(java.util.Optional source,
cn.featherfly.common.lang.reflect.Type<java.util.Optional> genericType)
源转目标
.
|
protected java.util.Optional |
doTargetToSource(T target,
cn.featherfly.common.lang.reflect.Type<java.util.Optional> genericType)
目标转源
.
|
protected Convertor |
getConvertor(java.lang.Class<?> type)
Gets the convertor.
|
void |
setConvertors(java.util.Collection<Convertor<?,T>> convertors)
设置convertors.
|
protected boolean |
supportFor(cn.featherfly.common.lang.reflect.Type<java.util.Optional> generecType)
是否提供对传入类型的支持
.
|
getPolicy, getSourceType, getTargetType, setPolicy, setSourceType, setTargetType, sourceToTarget, targetToSourcepublic void setConvertors(java.util.Collection<Convertor<?,T>> convertors)
convertors - convertorspublic void addConvertor(Convertor convertors)
convertors - convertorspublic void addConvertors(java.util.Collection<Convertor<?,T>> convertors)
convertors - convertorsprotected boolean supportFor(cn.featherfly.common.lang.reflect.Type<java.util.Optional> generecType)
是否提供对传入类型的支持
.supportFor 在类中 AbstractConvertor<java.util.Optional,T,cn.featherfly.common.lang.reflect.Type<java.util.Optional>>generecType - generecTypeprotected T doSourceToTarget(java.util.Optional source, cn.featherfly.common.lang.reflect.Type<java.util.Optional> genericType)
源转目标
.doSourceToTarget 在类中 AbstractConvertor<java.util.Optional,T,cn.featherfly.common.lang.reflect.Type<java.util.Optional>>source - 源对象genericType - 指定对象的上下文属性protected java.util.Optional doTargetToSource(T target, cn.featherfly.common.lang.reflect.Type<java.util.Optional> genericType)
目标转源
.doTargetToSource 在类中 AbstractConvertor<java.util.Optional,T,cn.featherfly.common.lang.reflect.Type<java.util.Optional>>target - 目标对象genericType - 指定对象的上下文属性protected Convertor getConvertor(java.lang.Class<?> type)
type - the type