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 Class |
forName(String name) |
protected static Class |
forNamePrimitive(String name) |
static Method |
getMethod(Object base,
Object property,
Class[] paramTypes)
Returns a method based on the criteria
|
static PropertyDescriptor |
getPropertyDescriptor(Object base,
Object property) |
protected static String |
paramString(Class[] types) |
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
ClassNotFoundExceptionpublic static Class[] toTypeArray(String[] s) throws ClassNotFoundException
s - array of class namesClassNotFoundException - if class was not foundpublic static String[] toTypeNameArray(Class[] c)
c - array of class typespublic static Method getMethod(Object base, Object property, Class[] paramTypes) throws javax.el.MethodNotFoundException
base - the object that owns the methodproperty - the name of the methodparamTypes - the parameter types to usejavax.el.MethodNotFoundException - if method was not foundpublic static PropertyDescriptor getPropertyDescriptor(Object base, Object property) throws javax.el.ELException, javax.el.PropertyNotFoundException
base - objectproperty - propertyjavax.el.ELException - in case of EL errorsjavax.el.PropertyNotFoundException - if property was not foundCopyright © 2000–2021 Apache Software Foundation. All rights reserved.