Package org.apache.cxf.common.util
Class ReflectionUtil
- java.lang.Object
- 
- org.apache.cxf.common.util.ReflectionUtil
 
- 
 public final class ReflectionUtil extends Object 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TaccessDeclaredField(Field f, Object o, Class<T> responseClass)static <T> TaccessDeclaredField(String fieldName, Class<?> cls, Object o, Class<T> responseClass)static <T extends Annotation>
 TgetAnnotationForMethodOrContainingClass(Method m, Class<T> annotationType)Look for a specified annotation on a method.static <T> Constructor<T>getConstructor(Class<T> cls, Class<?>... args)static <T> Constructor<T>getDeclaredConstructor(Class<T> cls, Class<?>... args)static <T> Constructor<T>[]getDeclaredConstructors(Class<T> cls)static FieldgetDeclaredField(Class<?> cls, String name)static Field[]getDeclaredFields(Class<?> cls)static MethodgetDeclaredMethod(Class<?> clazz, String name, Class<?>... parameterTypes)static Method[]getDeclaredMethods(Class<?> cls)static MethodgetMethod(Class<?> clazz, String name, Class<?>... parameterTypes)static PropertyDescriptor[]getPropertyDescriptorsAvoidSunBug(Class<?> refClass, BeanInfo beanInfo, Class<?> beanClass, PropertyDescriptor[] propertyDescriptors)create own array of property descriptors to:static <T extends AccessibleObject>
 TsetAccessible(T o)static <T extends AccessibleObject>
 TsetAccessible(T o, boolean b)
 
- 
- 
- 
Method Detail- 
accessDeclaredFieldpublic static <T> T accessDeclaredField(Field f, Object o, Class<T> responseClass) 
 - 
accessDeclaredFieldpublic static <T> T accessDeclaredField(String fieldName, Class<?> cls, Object o, Class<T> responseClass) 
 - 
getDeclaredConstructorpublic static <T> Constructor<T> getDeclaredConstructor(Class<T> cls, Class<?>... args) 
 - 
getConstructorpublic static <T> Constructor<T> getConstructor(Class<T> cls, Class<?>... args) 
 - 
getDeclaredConstructorspublic static <T> Constructor<T>[] getDeclaredConstructors(Class<T> cls) 
 - 
getDeclaredMethodpublic static Method getDeclaredMethod(Class<?> clazz, String name, Class<?>... parameterTypes) throws NoSuchMethodException - Throws:
- NoSuchMethodException
 
 - 
getMethodpublic static Method getMethod(Class<?> clazz, String name, Class<?>... parameterTypes) throws NoSuchMethodException - Throws:
- NoSuchMethodException
 
 - 
setAccessiblepublic static <T extends AccessibleObject> T setAccessible(T o) 
 - 
setAccessiblepublic static <T extends AccessibleObject> T setAccessible(T o, boolean b) 
 - 
getPropertyDescriptorsAvoidSunBugpublic static PropertyDescriptor[] getPropertyDescriptorsAvoidSunBug(Class<?> refClass, BeanInfo beanInfo, Class<?> beanClass, PropertyDescriptor[] propertyDescriptors) create own array of property descriptors to:- 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- Parameters:
- refClass- calling class for class loading.
- beanInfo- Bean in question
- beanClass- class for bean in question
- propertyDescriptors- raw descriptors
 
 - 
getAnnotationForMethodOrContainingClasspublic static <T extends Annotation> T getAnnotationForMethodOrContainingClass(Method m, Class<T> annotationType) Look for a specified annotation on a method. If there, return it. If not, search it's containing class. Assume that the annotation is marked @Inherited.- Parameters:
- m- method to examine
- annotationType- the annotation type to look for.
 
 
- 
 
-