Package org.glassfish.expressly.util
Class ReflectionUtil
- java.lang.Object
-
- org.glassfish.expressly.util.ReflectionUtil
-
public class ReflectionUtil extends Object
Utilities for Managing Serialization and Reflection- Version:
- $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
- Author:
- Jacob Hookom [jacob@hookom.net]
-
-
Field Summary
Fields Modifier and Type Field Description protected static String[]EMPTY_STRINGprotected static String[]PRIMITIVE_NAMESprotected static Class<?>[]PRIMITIVES
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object[]buildParameters(ELContext context, Class<?>[] parameterTypes, boolean isVarArgs, Object[] params)static MethodfindMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues)static Class<?>forName(String name)protected static Class<?>forNamePrimitive(String name)static PropertyDescriptorgetPropertyDescriptor(Object base, Object property)static Class<?>[]getTypesFromValues(Object[] values)static ObjectinvokeMethod(ELContext context, Method method, Object base, Object[] params)static Class<?>[]toTypeArray(String[] classNames)Converts an array of Class names to Class typesstatic String[]toTypeNameArray(Class<?>[] classTypes)Converts an array of Class types to Class names
-
-
-
Method Detail
-
forName
public static Class<?> forName(String name) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
toTypeArray
public static Class<?>[] toTypeArray(String[] classNames) throws ClassNotFoundException
Converts an array of Class names to Class types- Parameters:
classNames-- Returns:
- The array of Classes
- Throws:
ClassNotFoundException
-
toTypeNameArray
public static String[] toTypeNameArray(Class<?>[] classTypes)
Converts an array of Class types to Class names- Parameters:
classTypes-- Returns:
- The array of Classes
-
getPropertyDescriptor
public static PropertyDescriptor getPropertyDescriptor(Object base, Object property) throws ELException, PropertyNotFoundException
- Parameters:
base- The base objectproperty- The property- Returns:
- The PropertyDescriptor for the base with the given property
- Throws:
ELExceptionPropertyNotFoundException
-
invokeMethod
public static Object invokeMethod(ELContext context, Method method, Object base, Object[] params)
-
findMethod
public static Method findMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues)
-
-