public class ObjectMapper extends Object
限定符和类型 | 方法和说明 |
---|---|
static Object |
convertToObject(String value,
Class<?> toType)
基于Apache BeanUtils转换字符串到相应类型.
|
static <T> T |
map(Object source,
Class<T> destinationClass)
基于Dozer转换对象的类型.
|
static <T> List<T> |
mapList(Collection<?> sourceList,
Class<T> destinationClass)
基于Dozer转换Collection中对象的类型.
|
static void |
registerDateConverter(String patterns)
定义Apache BeanUtils日期Converter的格式,可注册多个格式,以','分隔
|
public static <T> List<T> mapList(Collection<?> sourceList, Class<T> destinationClass)
public static Object convertToObject(String value, Class<?> toType)
value
- 待转换的字符串.toType
- 转换目标类型.public static void registerDateConverter(String patterns)
Copyright © 2014 EPIC Team. All rights reserved.