public class ReflectionUtil extends Object
Modifier and Type | Field and Description |
---|---|
protected static String[] |
EMPTY_STRING |
protected static String[] |
PRIMITIVE_NAMES |
protected static Class[] |
PRIMITIVES |
Modifier and Type | Method and Description |
---|---|
static Method |
findMethod(Class<?> clazz,
String methodName,
Class<?>[] paramTypes,
Object[] paramValues) |
static Class |
forName(String name) |
protected static Class |
forNamePrimitive(String name) |
static PropertyDescriptor |
getPropertyDescriptor(Object base,
Object property) |
static Object |
invokeMethod(ELContext context,
Method m,
Object base,
Object[] params) |
static Class[] |
toTypeArray(String[] s)
Converts an array of Class names to Class types
|
static String[] |
toTypeNameArray(Class[] c)
Converts an array of Class types to Class names
|
protected static final String[] EMPTY_STRING
protected static final String[] PRIMITIVE_NAMES
protected static final Class[] PRIMITIVES
public static Class forName(String name) throws ClassNotFoundException
ClassNotFoundException
public static Class[] toTypeArray(String[] s) throws ClassNotFoundException
s
- ClassNotFoundException
public static String[] toTypeNameArray(Class[] c)
c
- public static PropertyDescriptor getPropertyDescriptor(Object base, Object property) throws ELException, PropertyNotFoundException
base
- The base objectproperty
- The propertyELException
PropertyNotFoundException
public static Object invokeMethod(ELContext context, Method m, Object base, Object[] params)
Copyright © 2016. All rights reserved.