com.google.code.rees.scope.util
Class ReflectionUtil

java.lang.Object
  extended by com.google.code.rees.scope.util.ReflectionUtil

public class ReflectionUtil
extends Object

A utility for obtaining inherited fields, methods, and annotations, and making fields accessible.

Author:
rees.byars

Constructor Summary
ReflectionUtil()
           
 
Method Summary
static
<T extends Annotation>
Set<T>
getAnnotationInstances(Class<?> clazz, Class<T> annotationClass)
           
static Set<Class<?>> getClasses(Class<?> clazz)
           
static Set<Field> getFields(Class<?> clazz)
           
static Set<Method> getMethods(Class<?> clazz)
           
static boolean isPropertyType(Class<?> type)
           
static boolean isPublicSetter(Method method)
           
static void makeAccessible(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

getFields

public static Set<Field> getFields(Class<?> clazz)

getMethods

public static Set<Method> getMethods(Class<?> clazz)

getClasses

public static Set<Class<?>> getClasses(Class<?> clazz)

getAnnotationInstances

public static <T extends Annotation> Set<T> getAnnotationInstances(Class<?> clazz,
                                                                   Class<T> annotationClass)

makeAccessible

public static void makeAccessible(Field field)

isPublicSetter

public static boolean isPublicSetter(Method method)

isPropertyType

public static boolean isPropertyType(Class<?> type)


Copyright © 2012-2013. All Rights Reserved.