public class Reflector extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Reflector.PropertyType |
static class |
Reflector.Target |
| Modifier and Type | Field and Description |
|---|---|
static ConcurrentHashMap<Class<?>,Reference<Map<String,com.googlecode.aviator.utils.Reflector.PropertyFoundResult>>> |
cachedMethods
static method caching
|
static ConcurrentHashMap<Class<?>,Reference<Map<String,com.googlecode.aviator.utils.Reflector.PropertyFoundResult>>> |
cachedProperties
static and instance fields property caching
|
static ConcurrentHashMap<Class<?>,Reference<Map<String,com.googlecode.aviator.utils.Reflector.PropertyFoundResult>>> |
cachedSettters
instance fields setter caching.
|
| Constructor and Description |
|---|
Reflector() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
boxArg(Class<?> paramType,
Object arg) |
static Object[] |
boxArgs(Class<?>[] params,
Object[] args) |
static StringBuilder |
capitalize(StringBuilder sb,
String s) |
static Object |
fastGetProperty(Object obj,
String name,
Reflector.PropertyType type) |
static Object |
fastGetProperty(String name,
String[] names,
Map<String,Object> env,
Reflector.Target target,
boolean tryResolveStaticMethod,
int offset,
int len) |
static List<Method> |
getInstanceMethods(Class<?> clazz,
String methodName) |
static Object |
getProperty(Object target,
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(Map<String,Object> env,
String name,
Object val) |
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) |
static Object |
throwNoSuchPropertyException(String msg) |
public static ConcurrentHashMap<Class<?>,Reference<Map<String,com.googlecode.aviator.utils.Reflector.PropertyFoundResult>>> cachedProperties
public static ConcurrentHashMap<Class<?>,Reference<Map<String,com.googlecode.aviator.utils.Reflector.PropertyFoundResult>>> cachedSettters
public static ConcurrentHashMap<Class<?>,Reference<Map<String,com.googlecode.aviator.utils.Reflector.PropertyFoundResult>>> cachedMethods
public static RuntimeException sneakyThrow(Throwable t)
throw sneakyThrow( some exception );
public static StringBuilder capitalize(StringBuilder sb, String s)
public static Object fastGetProperty(Object obj, String name, Reflector.PropertyType type)
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)
Copyright © 2010–2022. All rights reserved.