org.dozer.util
Class ReflectionUtils

java.lang.Object
  extended by org.dozer.util.ReflectionUtils

public final class ReflectionUtils
extends Object

Internal class that provides a various reflection utilities(specific to Dozer requirements) used throughout the code base. Not intended for direct use by application code.

Author:
tierney.matt, garsombke.franz

Method Summary
static Class<?> determineGenericsType(Method method, boolean isReadMethod)
           
static Class<?> determineGenericsType(PropertyDescriptor propDescriptor)
           
static Class<?> determineGenericsType(Type type)
           
static Method findAMethod(Class<?> clazz, String methodName)
           
static PropertyDescriptor findPropertyDescriptor(Class<?> objectClass, String fieldName, HintContainer deepIndexHintContainer)
           
static DeepHierarchyElement[] getDeepFieldHierarchy(Class<?> parentClass, String field, HintContainer deepIndexHintContainer)
           
static Field getFieldFromBean(Class<?> clazz, String fieldName)
           
static Method getMethod(Class<?> clazz, String methodName)
           
static Method getMethod(Class<?> clazz, String name, Class<?>[] parameterTypes)
           
static Method getMethod(Object obj, String methodName)
           
static PropertyDescriptor[] getPropertyDescriptors(Class<?> objectClass)
           
static Object invoke(Method method, Object obj, Object[] args)
           
static
<T> T
newInstance(Class<T> clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findPropertyDescriptor

public static PropertyDescriptor findPropertyDescriptor(Class<?> objectClass,
                                                        String fieldName,
                                                        HintContainer deepIndexHintContainer)

getDeepFieldHierarchy

public static DeepHierarchyElement[] getDeepFieldHierarchy(Class<?> parentClass,
                                                           String field,
                                                           HintContainer deepIndexHintContainer)

getMethod

public static Method getMethod(Object obj,
                               String methodName)

getMethod

public static Method getMethod(Class<?> clazz,
                               String methodName)

findAMethod

public static Method findAMethod(Class<?> clazz,
                                 String methodName)
                          throws NoSuchMethodException
Throws:
NoSuchMethodException

getPropertyDescriptors

public static PropertyDescriptor[] getPropertyDescriptors(Class<?> objectClass)

getFieldFromBean

public static Field getFieldFromBean(Class<?> clazz,
                                     String fieldName)

invoke

public static Object invoke(Method method,
                            Object obj,
                            Object[] args)

getMethod

public static Method getMethod(Class<?> clazz,
                               String name,
                               Class<?>[] parameterTypes)
                        throws NoSuchMethodException
Throws:
NoSuchMethodException

newInstance

public static <T> T newInstance(Class<T> clazz)

determineGenericsType

public static Class<?> determineGenericsType(PropertyDescriptor propDescriptor)

determineGenericsType

public static Class<?> determineGenericsType(Method method,
                                             boolean isReadMethod)

determineGenericsType

public static Class<?> determineGenericsType(Type type)


Copyright © 2005-2011 dozer. All Rights Reserved.