public abstract class CopyObjectUtil extends Object
| 构造器和说明 |
|---|
CopyObjectUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
copy(Class<T> target,
Map<String,Object> extra)
simple properties copy
|
static <T> T |
copy(Object source,
Class<T> target)
simple properties copy
|
static <T> T |
copy(Object source,
Class<T> target,
List<String> skips)
simple properties copy
|
static <T> T |
copy(Object source,
Class<T> target,
Map<String,String> rename)
simple properties copy
|
static <T> T |
copy(Object source,
Class<T> target,
Map<String,String> rename,
Map<String,Object> extra,
List<String> skips)
simple properties copy
|
public static <T> T copy(Object source, Class<T> target)
source - the source objecttarget - the target classpublic static <T> T copy(Class<T> target, Map<String,Object> extra)
target - the target classextra - the other properties(key: the target object field name, value: the value)public static <T> T copy(Object source, Class<T> target, Map<String,String> rename)
source - the source objecttarget - the target classrename - the need rename properties(key:the source object field name, value: the target object field name)public static <T> T copy(Object source, Class<T> target, List<String> skips)
source - the source objecttarget - the target classskips - the not need copy properties listpublic static <T> T copy(Object source, Class<T> target, Map<String,String> rename, Map<String,Object> extra, List<String> skips)
source - the source objecttarget - the target classrename - the need rename properties(key:the source object field name, value: the target object field name)extra - the other properties(key: the target object field name, value: the value)skips - the not need copy properties listCopyright © 2018. All rights reserved.