public class BeanConvertUtils
extends org.springframework.beans.BeanUtils
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
BeanConvertUtils.ConvertCallBack<S,T>
回调接口
|
| 构造器和说明 |
|---|
BeanConvertUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <S,T> List<T> |
convertListTo(List<S> sources,
Supplier<T> targetSupplier) |
static <S,T> List<T> |
convertListTo(List<S> sources,
Supplier<T> targetSupplier,
BeanConvertUtils.ConvertCallBack<S,T> callBack)
List转换(有返回值,带回调)
|
static <S,T> T |
convertTo(S source,
Supplier<T> targetSupplier)
对象转换(有返回值)
|
static <S,T> T |
convertTo(S source,
Supplier<T> targetSupplier,
BeanConvertUtils.ConvertCallBack<S,T> callBack)
转换对象(有返回值,带回调)
|
static <S,T> void |
convertTo(S source,
T target)
cglib实现对象转换(无返回值)
|
copyProperties, copyProperties, copyProperties, findDeclaredMethod, findDeclaredMethodWithMinimalParameters, findEditorByConvention, findMethod, findMethodWithMinimalParameters, findMethodWithMinimalParameters, findPrimaryConstructor, findPropertyForMethod, findPropertyForMethod, findPropertyType, getParameterNames, getPropertyDescriptor, getPropertyDescriptors, getResolvableConstructor, getWriteMethodParameter, instantiate, instantiateClass, instantiateClass, instantiateClass, isSimpleProperty, isSimpleValueType, resolveSignaturepublic static <S,T> void convertTo(S source,
T target)
S - 源对象类型T - 目标对象类型source - 源对象target - 目标对象public static <S,T> T convertTo(S source,
Supplier<T> targetSupplier)
S - 源对象类型T - 目标对象类型source - 源对象targetSupplier - 目标对象供应方public static <S,T> T convertTo(S source,
Supplier<T> targetSupplier,
BeanConvertUtils.ConvertCallBack<S,T> callBack)
S - 源对象类型T - 目标对象类型source - 源对象targetSupplier - 目标对象供应方callBack - 回调方法public static <S,T> List<T> convertListTo(List<S> sources, Supplier<T> targetSupplier)
public static <S,T> List<T> convertListTo(List<S> sources, Supplier<T> targetSupplier, BeanConvertUtils.ConvertCallBack<S,T> callBack)
S - 源对象类型T - 目标对象类型sources - 源对象listtargetSupplier - 目标对象供应方callBack - 回调方法Copyright © 2022. All rights reserved.