Package org.miaixz.bus.core.bean.copier
Class BeanCopier<T>
java.lang.Object
org.miaixz.bus.core.bean.copier.BeanCopier<T>
- Type Parameters:
T- 目标对象类型
- All Implemented Interfaces:
Serializable,Copier<T>
Bean拷贝,提供:
1. Bean 转 Bean
2. Bean 转 Map
3. Map 转 Bean
4. Map 转 Map
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBeanCopier(Object source, T target, Type targetType, CopyOptions copyOptions) 构造 -
Method Summary
Modifier and TypeMethodDescriptioncopy()执行拷贝static <T> BeanCopier<T> of(Object source, T target, Type destType, CopyOptions copyOptions) 创建BeanCopierstatic <T> BeanCopier<T> of(Object source, T target, CopyOptions copyOptions) 创建BeanCopier
-
Constructor Details
-
BeanCopier
构造- Parameters:
source- 来源对象,可以是Bean或者Map,不能为nulltarget- 目标Bean对象,不能为nulltargetType- 目标的泛型类型,用于标注有泛型参数的Bean对象copyOptions- 拷贝属性选项
-
-
Method Details
-
of
创建BeanCopier- Type Parameters:
T- 目标Bean类型- Parameters:
source- 来源对象,可以是Bean或者Maptarget- 目标Bean对象copyOptions- 拷贝属性选项- Returns:
- BeanCopier
-
of
创建BeanCopier- Type Parameters:
T- 目标Bean类型- Parameters:
source- 来源对象,可以是Bean或者Maptarget- 目标Bean对象destType- 目标的泛型类型,用于标注有泛型参数的Bean对象copyOptions- 拷贝属性选项- Returns:
- BeanCopier
-
copy
Description copied from interface:Copier执行拷贝
-