Liferay 6.2-ce-ga5

com.liferay.portal.kernel.util
Class ReflectionUtil

java.lang.Object
  extended by com.liferay.portal.kernel.util.ReflectionUtil

public class ReflectionUtil
extends Object


Constructor Summary
ReflectionUtil()
           
 
Method Summary
static Class<?> getAnnotationDeclaringClass(Class<? extends Annotation> annotationClass, Class<?> clazz)
           
protected static Method getBridgeMethod(boolean publicMethod, Class<?> clazz, String name, Class<?>... parameterTypes)
           
static Method getBridgeMethod(Class<?> clazz, String name, Class<?>... parameterTypes)
           
static Method getDeclaredBridgeMethod(Class<?> clazz, String name, Class<?>... parameterTypes)
           
static Field getDeclaredField(Class<?> clazz, String name)
           
static Method getDeclaredMethod(Class<?> clazz, String name, Class<?>... parameterTypes)
           
static Class<?>[] getInterfaces(Object object)
           
static Class<?>[] getInterfaces(Object object, ClassLoader classLoader)
           
static Class<?>[] getParameterTypes(Object[] arguments)
           
static boolean isAnnotationDeclaredInClass(Class<? extends Annotation> annotationClass, Class<?> clazz)
           
static
<T extends Enum<T>>
T
newEnumElement(Class<T> enumClass, Class<?>[] constructorParameterTypes, String name, int ordinal, Object... constructorParameters)
           
static
<T extends Enum<T>>
T
newEnumElement(Class<T> enumClass, String name, int ordinal)
           
static
<T> T
throwException(Throwable throwable)
           
static Field unfinalField(Field field)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtil

public ReflectionUtil()
Method Detail

getAnnotationDeclaringClass

public static Class<?> getAnnotationDeclaringClass(Class<? extends Annotation> annotationClass,
                                                   Class<?> clazz)

getBridgeMethod

public static Method getBridgeMethod(Class<?> clazz,
                                     String name,
                                     Class<?>... parameterTypes)
                              throws Exception
Throws:
Exception

getDeclaredBridgeMethod

public static Method getDeclaredBridgeMethod(Class<?> clazz,
                                             String name,
                                             Class<?>... parameterTypes)
                                      throws Exception
Throws:
Exception

getDeclaredField

public static Field getDeclaredField(Class<?> clazz,
                                     String name)
                              throws Exception
Throws:
Exception

getDeclaredMethod

public static Method getDeclaredMethod(Class<?> clazz,
                                       String name,
                                       Class<?>... parameterTypes)
                                throws Exception
Throws:
Exception

getInterfaces

public static Class<?>[] getInterfaces(Object object)

getInterfaces

public static Class<?>[] getInterfaces(Object object,
                                       ClassLoader classLoader)

getParameterTypes

public static Class<?>[] getParameterTypes(Object[] arguments)

isAnnotationDeclaredInClass

public static boolean isAnnotationDeclaredInClass(Class<? extends Annotation> annotationClass,
                                                  Class<?> clazz)

newEnumElement

public static <T extends Enum<T>> T newEnumElement(Class<T> enumClass,
                                                   Class<?>[] constructorParameterTypes,
                                                   String name,
                                                   int ordinal,
                                                   Object... constructorParameters)
                                        throws Exception
Throws:
Exception

newEnumElement

public static <T extends Enum<T>> T newEnumElement(Class<T> enumClass,
                                                   String name,
                                                   int ordinal)
                                        throws Exception
Throws:
Exception

throwException

public static <T> T throwException(Throwable throwable)

unfinalField

public static Field unfinalField(Field field)
                          throws Exception
Throws:
Exception

getBridgeMethod

protected static Method getBridgeMethod(boolean publicMethod,
                                        Class<?> clazz,
                                        String name,
                                        Class<?>... parameterTypes)
                                 throws Exception
Throws:
Exception

Liferay 6.2-ce-ga5