public final class MappingUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
applyGlobalCopyByReference(Configuration globalConfig,
FieldMap fieldMap,
ClassMap classMap) |
static <T> T |
deProxy(T object) |
static Class<?> |
determineCustomConverter(FieldMap fieldMap,
Cache converterByDestTypeCache,
CustomConverterContainer customConverterContainer,
Class<?> srcClass,
Class<?> destClass) |
static Class<?> |
findCustomConverter(Cache converterByDestTypeCache,
CustomConverterContainer customConverterContainer,
Class<?> srcClass,
Class<?> destClass) |
static String |
getClassNameWithoutPackage(Class<?> clazz) |
static Object |
getIndexedValue(Object collection,
int index) |
static List<Class<?>> |
getInterfaceHierarchy(Class<?> srcClass) |
static String |
getMappedParentFieldKey(Object destObj,
FieldMap destFieldMap) |
static Class<?> |
getRealClass(Class<?> clazz) |
static Throwable |
getRootCause(Throwable ex) |
static List<Class<?>> |
getSuperClassesAndInterfaces(Class<?> srcClass) |
static boolean |
isBlankOrNull(String value) |
static boolean |
isDeepMapping(String mapping) |
static boolean |
isEnumType(Class<?> srcFieldClass)
Used to test if
srcFieldClass is enum. |
static boolean |
isEnumType(Class<?> srcFieldClass,
Class<?> destFieldType)
Used to test if both
srcFieldClass and destFieldType are enum. |
static boolean |
isProxy(Class<?> clazz) |
static boolean |
isSupportedCollection(Class<?> aClass) |
static boolean |
isSupportedMap(Class<?> aClass) |
static Class<?> |
loadClass(String name) |
static Object |
prepareIndexedCollection(Class<?> collectionType,
Object existingCollection,
Object collectionEntry,
int index) |
static void |
reverseFields(ClassMap source,
ClassMap destination) |
static void |
reverseFields(FieldMap source,
FieldMap reversed) |
static void |
throwMappingException(String msg) |
static void |
throwMappingException(String msg,
Throwable cause) |
static void |
throwMappingException(Throwable e) |
public static boolean isSupportedCollection(Class<?> aClass)
public static boolean isSupportedMap(Class<?> aClass)
public static void throwMappingException(Throwable e) throws MappingException
MappingExceptionpublic static void throwMappingException(String msg) throws MappingException
MappingExceptionpublic static void throwMappingException(String msg, Throwable cause) throws MappingException
MappingExceptionpublic static boolean isBlankOrNull(String value)
public static String getMappedParentFieldKey(Object destObj, FieldMap destFieldMap)
public static Class<?> findCustomConverter(Cache converterByDestTypeCache, CustomConverterContainer customConverterContainer, Class<?> srcClass, Class<?> destClass)
public static Class<?> determineCustomConverter(FieldMap fieldMap, Cache converterByDestTypeCache, CustomConverterContainer customConverterContainer, Class<?> srcClass, Class<?> destClass)
public static void applyGlobalCopyByReference(Configuration globalConfig, FieldMap fieldMap, ClassMap classMap)
public static <T> T deProxy(T object)
public static boolean isProxy(Class<?> clazz)
public static Object prepareIndexedCollection(Class<?> collectionType, Object existingCollection, Object collectionEntry, int index)
public static boolean isDeepMapping(String mapping)
public static boolean isEnumType(Class<?> srcFieldClass)
srcFieldClass is enum.srcFieldClass - the source field to be tested.true if and only if current running JRE is 1.5 or above, and
srcFieldClass is enum; otherwise return false.public static boolean isEnumType(Class<?> srcFieldClass, Class<?> destFieldType)
srcFieldClass and destFieldType are enum.srcFieldClass - the source field to be tested.destFieldType - the destination field to be tested.true if and only if current running JRE is 1.5 or above, and both
srcFieldClass and destFieldType are enum; otherwise return false.public static List<Class<?>> getSuperClassesAndInterfaces(Class<?> srcClass)
Copyright © 2005-2014 dozer. All Rights Reserved.