public class Reflector extends Object
| Constructor | Description |
|---|---|
Reflector() |
| Modifier and Type | Method | Description |
|---|---|---|
static Object |
boxArg(Class paramType,
Object arg) |
|
static Object[] |
boxArgs(Class[] params,
Object[] args) |
|
static org.apache.commons.beanutils.BeanUtilsBean |
getBeanUtilsBean() |
|
static List<Method> |
getInstanceMethods(Class<?> clazz,
String methodName) |
|
static Object |
getProperty(Map<String,Object> env,
String name) |
|
static List<Method> |
getStaticMethods(Class c,
String methodName) |
|
static Object |
invokeInstanceMethod(Class c,
String methodName,
Object target,
List<Method> methods,
Object[] args) |
|
static Object |
invokeStaticMethod(Class c,
String methodName,
List<Method> methods,
Object[] args) |
|
static boolean |
isCongruent(Class[] params,
Object[] args) |
|
static boolean |
paramArgTypeMatch(Class paramType,
Class argType) |
|
static void |
setProperty(Object bean,
String name,
Object value) |
|
static RuntimeException |
sneakyThrow(Throwable t) |
Throw even checked exceptions without being required to declare them or catch them.
|
static boolean |
subsumes(Class[] c1,
Class[] c2) |
public static RuntimeException sneakyThrow(Throwable t)
throw sneakyThrow( some exception );
public static List<Method> getInstanceMethods(Class<?> clazz, String methodName)
public static Object invokeStaticMethod(Class c, String methodName, List<Method> methods, Object[] args)
public static Object invokeInstanceMethod(Class c, String methodName, Object target, List<Method> methods, Object[] args)
public static org.apache.commons.beanutils.BeanUtilsBean getBeanUtilsBean()
public static Object getProperty(Map<String,Object> env, String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
public static void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
Copyright © 2022–2023. All rights reserved.