02/28/2005
 

com.epicentric.common
Class ReflectionUtils

java.lang.Object
  |
  +--com.epicentric.common.ReflectionUtils

Deprecated. as of version 4.5, to be removed in 8.0 or later. Moved to new location ReflectionUtils.

public class ReflectionUtils
extends Object

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

ReflectionUtils

public ReflectionUtils()
Deprecated. 
Method Detail

getProperty

public static String getProperty(Object obj,
                                 String property)
Deprecated. 
Get property from standard accessor method.
Parameters:
property - if "object", method must be getObject()

setProperty

public static void setProperty(Object obj,
                               String property,
                               Object value)
Deprecated. 
Use the standard mutator method: set(property) to set the value.
Parameters:
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.

lookupReadMethod

public static Method lookupReadMethod(Object obj,
                                      String name)
Deprecated. 
Get the standard accessor given name of property.
Parameters:
name - if "object", accessor method must be "getObject()"

lookupWriteMethod

public static Method lookupWriteMethod(Object obj,
                                       String name)
Deprecated. 
Get the standard mutator given name of property.
Parameters:
name - if "object", mutator method must be "setObject(value)"

lookupReadOrWriteMethod

public static Method lookupReadOrWriteMethod(Object obj,
                                             String name,
                                             boolean isRead)
Deprecated. 

getBoolean

public static Boolean getBoolean(Object object)
Deprecated. 

getByte

public static Byte getByte(Object object)
Deprecated. 

getShort

public static Short getShort(Object object)
Deprecated. 

getCharacter

public static Character getCharacter(Object object)
Deprecated. 

getInteger

public static Integer getInteger(Object object)
Deprecated. 

getInteger

public static Integer getInteger(Object object,
                                 int default_value)
Deprecated. 

getLong

public static Long getLong(Object object)
Deprecated. 

getFloat

public static Float getFloat(Object object)
Deprecated. 

getDouble

public static Double getDouble(Object object)
Deprecated. 

convertToType

public static Object convertToType(Object object,
                                   Class type)
Deprecated. 

getType

public static Class getType(String type)
Deprecated. 

getMethod

public static Method getMethod(Object anyInstance,
                               String methodName,
                               Object[] params)
                        throws NoSuchMethodException
Deprecated. 
One of a handful of getMethod implementations, designed to get a method to invoke with a single call.
Parameters:
anyInstance - instance upon which to invoke method.
methodName -  
params - An array of objects that form the parameters to the method call.
Returns:
Method

getMethod

public static Method getMethod(String fullClassName,
                               String methodName,
                               String[] paramClassNames)
                        throws ClassNotFoundException,
                               NoSuchMethodException
Deprecated. 
One of a handful of getMethod implementations, designed to get a method to invoke with a single call.
Parameters:
fullClassName - (must include package)
methodName -  
paramClassNames - full class names of parameters
Returns:
method

getMethod

public static Method getMethod(Class thisClass,
                               String methodName,
                               Class[] paramClasses)
                        throws NoSuchMethodException
Deprecated. 
One of a handful of getMethod implementations, designed to get a method to invoke with a single call. This is the core method, which actually interrogates the class for the method.
Parameters:
thisClass - class upon which to invoke method.
methodName -  
paramClasses - An array of classes that are arguments to the method call.

02/28/2005
 

Copyright and Trademark Notices