public class ReflectionUtil extends Object
Modifier and Type | Field and Description |
---|---|
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(EvaluationContext ctx,
Object base,
Object property,
Class<?>[] paramTypes,
Object[] paramValues)
Returns a method based on the criteria.
|
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[] 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
- The array of class namesClassNotFoundException
- If a class of a given name cannot be foundpublic static String[] toTypeNameArray(Class<?>[] c)
c
- The array of class instancespublic static Method getMethod(EvaluationContext ctx, Object base, Object property, Class<?>[] paramTypes, Object[] paramValues) throws MethodNotFoundException
ctx
- the context in which the expression is being evaluatedbase
- the object that owns the methodproperty
- the name of the methodparamTypes
- the parameter types to useparamValues
- the parameter valuesMethodNotFoundException
- If a method cannot be found that matches
the given criteriaCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.