T - 类型public interface Convertor<S,T>
转换器
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Class<S> |
getSourceType()
返回转换器支持的转换源的类型
|
java.lang.Class<T> |
getTargetType()
返回转换器支持的转换目标的类型
|
<GS extends cn.featherfly.common.lang.reflect.Type<S>> |
sourceToTarget(S source,
GS genericType)
转换源对象到目标类型对象
|
<GT extends cn.featherfly.common.lang.reflect.Type<S>> |
targetToSource(T target,
GT genericType)
转换目标对象到源类型对象
|
java.lang.Class<S> getSourceType()
返回转换器支持的转换源的类型
java.lang.Class<T> getTargetType()
返回转换器支持的转换目标的类型
<GS extends cn.featherfly.common.lang.reflect.Type<S>> T sourceToTarget(S source, GS genericType)
转换源对象到目标类型对象
GS - Type子类泛型source - 需要转换的对象genericType - 需要转换的对象的上下文属性