|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.granite.util.Reflections
public class Reflections
Reflections class copied from JBoss Seam. www.seamframework.org jboss-seam-2.0.0.GA Author unattributed
| Constructor Summary | |
|---|---|
Reflections()
|
|
| Method Summary | |
|---|---|
static Class<?> |
classForName(String name)
|
static Object |
get(Field field,
Object target)
|
static Object |
getAndWrap(Field field,
Object target)
|
static Class<?> |
getCollectionElementType(Type collectionType)
|
static Field |
getField(Class<?> clazz,
String name)
|
static List<Field> |
getFields(Class<?> clazz,
Class<? extends Annotation> annotation)
Get all the fields which are annotated with the given annotation. |
static Method |
getGetterMethod(Class<?> clazz,
String name)
|
static List<Method> |
getGetterMethods(Class<?> clazz,
Class<? extends Annotation> annotation)
Get all the getter methods annotated with the given annotation. |
static Class<?> |
getMapKeyType(Type collectionType)
|
static Method |
getMethod(Annotation annotation,
String name)
|
static Method |
getSetterMethod(Class<?> clazz,
String name)
|
static Object |
invoke(Method method,
Object target,
Object... args)
|
static Object |
invokeAndWrap(Method method,
Object target,
Object... args)
|
static boolean |
isClassAvailable(String name)
Return's true if the class can be loaded using Reflections.classForName() |
static boolean |
isInstanceOf(Class<?> clazz,
String name)
|
static void |
set(Field field,
Object target,
Object value)
|
static void |
setAndWrap(Field field,
Object target,
Object value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Reflections()
| Method Detail |
|---|
public static Object invoke(Method method,
Object target,
Object... args)
throws Exception
Exception
public static Object get(Field field,
Object target)
throws Exception
Exception
public static void set(Field field,
Object target,
Object value)
throws Exception
Exception
public static Object getAndWrap(Field field,
Object target)
public static void setAndWrap(Field field,
Object target,
Object value)
public static Object invokeAndWrap(Method method,
Object target,
Object... args)
public static Class<?> classForName(String name)
throws ClassNotFoundException
ClassNotFoundExceptionpublic static boolean isClassAvailable(String name)
public static Class<?> getCollectionElementType(Type collectionType)
public static Class<?> getMapKeyType(Type collectionType)
public static Method getSetterMethod(Class<?> clazz,
String name)
public static Method getGetterMethod(Class<?> clazz,
String name)
public static List<Method> getGetterMethods(Class<?> clazz,
Class<? extends Annotation> annotation)
public static Field getField(Class<?> clazz,
String name)
public static List<Field> getFields(Class<?> clazz,
Class<? extends Annotation> annotation)
public static Method getMethod(Annotation annotation,
String name)
public static boolean isInstanceOf(Class<?> clazz,
String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||