public class ReflectHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ReflectHelper.ClassDecision |
static class |
ReflectHelper.MethodParameter |
static interface |
ReflectHelper.Processor |
| Modifier and Type | Field and Description |
|---|---|
static ReflectHelper.ClassDecision |
ALL_OBJECT |
static ReflectHelper.ClassDecision |
ALL_OBJECT_EXCEPT_JDK |
static ReflectHelper.ClassDecision |
NOT_NULL |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
belong(Method method,
Class<?> clz) |
static void |
foreachClass(ReflectHelper.Processor processor,
Class<?>... classes) |
static void |
foreachClass(ReflectHelper.Processor processor,
ClassNameFilter filter,
String... packages) |
static Field[] |
getAllDeclaredFields(Class<?> clz) |
static Field[] |
getAllDeclaredFields(Class<?> clz,
ReflectHelper.ClassDecision decision) |
static Collection<Class<?>> |
getClasses(String packageName) |
static Collection<Class<?>> |
getClasses(String packageName,
ClassNameFilter filter) |
static String |
getParameterName(Constructor constructor,
int index) |
static String |
getParameterName(Constructor constructor,
int index,
String prefix) |
static String |
getParameterName(Method method,
int index) |
static String |
getParameterName(Method method,
int index,
String prefix) |
static Object |
invoke(Object obj,
Method method,
Object[] args) |
static <T> T |
throwExceptionObject(Class<T> interfaceClass,
Throwable th) |
public static final ReflectHelper.ClassDecision NOT_NULL
public static final ReflectHelper.ClassDecision ALL_OBJECT
public static final ReflectHelper.ClassDecision ALL_OBJECT_EXCEPT_JDK
public static String getParameterName(Method method, int index) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException
public static String getParameterName(Constructor constructor, int index, String prefix)
public static String getParameterName(Constructor constructor, int index) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException
public static Field[] getAllDeclaredFields(Class<?> clz, ReflectHelper.ClassDecision decision)
public static Object invoke(Object obj, Method method, Object[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException
public static Collection<Class<?>> getClasses(String packageName)
public static Collection<Class<?>> getClasses(String packageName, ClassNameFilter filter)
public static void foreachClass(ReflectHelper.Processor processor, ClassNameFilter filter, String... packages)
public static void foreachClass(ReflectHelper.Processor processor, Class<?>... classes)
Copyright © 2018. All rights reserved.