|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.weld.environment.servlet.util.Reflections
public abstract class Reflections
Reflection utilities
Method Summary | ||
---|---|---|
static
|
classForName(String name)
|
|
static Field |
findDeclaredField(Class<?> clazz,
String name)
Search the class hierarchy for a field with the given name. |
|
static Method |
findDeclaredMethod(Class<?> clazz,
String name,
Class<?>... args)
Search the class hierarchy for a method with the given name and arguments. |
|
static ClassLoader |
getClassLoader()
|
|
static
|
getFieldValue(Field field,
Object instance,
Class<T> expectedType)
|
|
static
|
invokeMethod(Method method,
Class<T> expectedReturnType,
Object instance,
Object... args)
|
|
static
|
newInstance(String className)
|
|
static void |
setFieldValue(Field field,
Object instance,
Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> T newInstance(String className)
public static <T> Class<T> classForName(String name)
public static Method findDeclaredMethod(Class<?> clazz, String name, Class<?>... args)
clazz
- The class to searchname
- The name of the method to search forargs
- The arguments of the method to search for
public static Field findDeclaredField(Class<?> clazz, String name)
clazz
- The class to searchname
- The name of the field to search for
public static <T> T invokeMethod(Method method, Class<T> expectedReturnType, Object instance, Object... args)
public static void setFieldValue(Field field, Object instance, Object value)
public static <T> T getFieldValue(Field field, Object instance, Class<T> expectedType)
public static ClassLoader getClassLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |