|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.epicentric.common.ReflectionUtils
ReflectionUtils.
Utilities for examining and manipulating classes and objects.
| Constructor Summary | |
ReflectionUtils()
Deprecated. |
|
| Method Summary | |
static Object |
convertToType(Object object,
Class type)
Deprecated. |
static Boolean |
getBoolean(Object object)
Deprecated. |
static Byte |
getByte(Object object)
Deprecated. |
static Character |
getCharacter(Object object)
Deprecated. |
static Double |
getDouble(Object object)
Deprecated. |
static Float |
getFloat(Object object)
Deprecated. |
static Integer |
getInteger(Object object)
Deprecated. |
static Integer |
getInteger(Object object,
int default_value)
Deprecated. |
static Long |
getLong(Object object)
Deprecated. |
static Method |
getMethod(Class thisClass,
String methodName,
Class[] paramClasses)
Deprecated. One of a handful of getMethod implementations, designed to get a method to invoke with a single call. |
static Method |
getMethod(Object anyInstance,
String methodName,
Object[] params)
Deprecated. One of a handful of getMethod implementations, designed to get a method to invoke with a single call. |
static Method |
getMethod(String fullClassName,
String methodName,
String[] paramClassNames)
Deprecated. One of a handful of getMethod implementations, designed to get a method to invoke with a single call. |
static String |
getProperty(Object obj,
String property)
Deprecated. Get property from standard accessor method. |
static Short |
getShort(Object object)
Deprecated. |
static Class |
getType(String type)
Deprecated. |
static Method |
lookupReadMethod(Object obj,
String name)
Deprecated. Get the standard accessor given name of property. |
static Method |
lookupReadOrWriteMethod(Object obj,
String name,
boolean isRead)
Deprecated. |
static Method |
lookupWriteMethod(Object obj,
String name)
Deprecated. Get the standard mutator given name of property. |
static void |
setProperty(Object obj,
String property,
Object value)
Deprecated. Use the standard mutator method: set(property) to set the value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ReflectionUtils()
| Method Detail |
public static String getProperty(Object obj,
String property)
property - if "object", method must be getObject()
public static void setProperty(Object obj,
String property,
Object value)
value - is value to set. If the set(property) method's argument
is primitive, it must be wrapped in the corresponding
Object wrapper (e.g. Integer for an int).property - is name, and set(property) must be defined ...
Note that the first character of property will be changed to upper
case to make the name. For details, see JavaBean specification.
public static Method lookupReadMethod(Object obj,
String name)
name - if "object", accessor method must be "getObject()"
public static Method lookupWriteMethod(Object obj,
String name)
name - if "object", mutator method must be "setObject(value)"
public static Method lookupReadOrWriteMethod(Object obj,
String name,
boolean isRead)
public static Boolean getBoolean(Object object)
public static Byte getByte(Object object)
public static Short getShort(Object object)
public static Character getCharacter(Object object)
public static Integer getInteger(Object object)
public static Integer getInteger(Object object,
int default_value)
public static Long getLong(Object object)
public static Float getFloat(Object object)
public static Double getDouble(Object object)
public static Object convertToType(Object object,
Class type)
public static Class getType(String type)
public static Method getMethod(Object anyInstance,
String methodName,
Object[] params)
throws NoSuchMethodException
anyInstance - instance upon which to invoke method.methodName - params - An array of objects that form the parameters to the method call.
public static Method getMethod(String fullClassName,
String methodName,
String[] paramClassNames)
throws ClassNotFoundException,
NoSuchMethodException
fullClassName - (must include package)methodName - paramClassNames - full class names of parameters
public static Method getMethod(Class thisClass,
String methodName,
Class[] paramClasses)
throws NoSuchMethodException
thisClass - class upon which to invoke method.methodName - paramClasses - An array of classes that are arguments to the method call.
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||