|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.common.util.ReflectionUtil
public final class ReflectionUtil
Method Summary | ||
---|---|---|
static Method |
findMethod(Class<?> cls,
String name,
Class<?>... params)
Try to find a method we can use. |
|
static
|
getAnnotationForMethodOrContainingClass(Method m,
Class<T> annotationType)
Look for a specified annotation on a method. |
|
static
|
getConstructor(Class<T> cls,
Class<?>... args)
|
|
static
|
getDeclaredConstructor(Class<T> cls,
Class<?>... args)
|
|
static Field |
getDeclaredField(Class<?> cls,
String name)
|
|
static Field[] |
getDeclaredFields(Class<?> cls)
|
|
static Method[] |
getDeclaredMethods(Class<?> cls)
|
|
static List<String> |
getPackagesFromJar(File jarFile)
|
|
static PropertyDescriptor[] |
getPropertyDescriptorsAvoidSunBug(Class<?> refClass,
BeanInfo beanInfo,
Class<?> beanClass,
PropertyDescriptor[] propertyDescriptors)
create own array of property descriptors to: |
|
static
|
setAccessible(T o)
|
|
static
|
setAccessible(T o,
boolean b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Field getDeclaredField(Class<?> cls, String name)
public static <T> Constructor<T> getDeclaredConstructor(Class<T> cls, Class<?>... args)
public static <T> Constructor<T> getConstructor(Class<T> cls, Class<?>... args)
public static Method[] getDeclaredMethods(Class<?> cls)
public static Field[] getDeclaredFields(Class<?> cls)
public static <T extends AccessibleObject> T setAccessible(T o)
public static <T extends AccessibleObject> T setAccessible(T o, boolean b)
public static List<String> getPackagesFromJar(File jarFile) throws IOException
IOException
public static PropertyDescriptor[] getPropertyDescriptorsAvoidSunBug(Class<?> refClass, BeanInfo beanInfo, Class<?> beanClass, PropertyDescriptor[] propertyDescriptors)
- prevent memory leaks by Introspector's cache - get correct type for generic properties from superclass that are limited to a specific type in beanClass see http://bugs.sun.com/view_bug.do?bug_id=6528714 we cannot use BeanUtils.getPropertyDescriptors because of issue SPR-6063
refClass
- calling class for class loading.beanInfo
- Bean in questionbeanClass
- class for bean in questionpropertyDescriptors
- raw descriptors
public static Method findMethod(Class<?> cls, String name, Class<?>... params)
public static <T extends Annotation> T getAnnotationForMethodOrContainingClass(Method m, Class<T> annotationType)
m
- method to examineannotationType
- the annotation type to look for.
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |