public class MethodInvocationUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String | CLASS_NAME
Name of this class
|
static java.lang.String | COPYRIGHT
IBM Copyright
|
static java.lang.String | GETTER_METHOD_HEADER
getters start with this string
|
static java.lang.String | SETTER_METHOD_HEADER
setters start with this string
|
Constructor and Description |
---|
MethodInvocationUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Method | findMethod(java.lang.Class klass, java.lang.String methodName, java.lang.Class[] parameters)
Returns the first found Method object that is a public member method of the class or interface represented by this Class object, if any.
|
static java.lang.Class | getClass(java.lang.String shortName)
Returns the Class that is represents by the given class name.
|
static java.lang.String | getClassFullName(java.lang.String shortName)
Returns the full name of a class that has the given short name
|
static java.lang.Package | getPackage(java.lang.String name)
Returns the package that contains a registered class
|
static java.lang.String | getPackageName(java.lang.String name)
Returns the package name of a registered class
|
static java.lang.Object | getProperty(java.lang.Object target, java.lang.String propertyName)
Gets the value of a property.
|
static java.lang.reflect.Method | getReadMethod(java.lang.Object obj, java.lang.String property)
Gets the getter of a property in a given object following JavaBean spec.
|
static java.lang.reflect.Method | getWriteMethod(java.lang.Object obj, java.lang.String property)
Gets the setter of a property in a given object following JavaBean spec.
|
static void | registerClass(java.lang.Class aClass)
Associate a class's name with the class's package
|
static boolean | setProperty(java.lang.Object target, java.lang.String propertyName, java.lang.Object propertyValue)
Sets a property value to a property in a given object.
|
public static final java.lang.String GETTER_METHOD_HEADER
public static final java.lang.String SETTER_METHOD_HEADER
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public static java.lang.Class getClass(java.lang.String shortName)
public static void registerClass(java.lang.Class aClass)
public static java.lang.Package getPackage(java.lang.String name)
public static java.lang.String getPackageName(java.lang.String name)
public static java.lang.String getClassFullName(java.lang.String shortName)
public static boolean setProperty(java.lang.Object target, java.lang.String propertyName, java.lang.Object propertyValue)
public static java.lang.reflect.Method getReadMethod(java.lang.Object obj, java.lang.String property)
public static java.lang.reflect.Method getWriteMethod(java.lang.Object obj, java.lang.String property)
public static java.lang.reflect.Method findMethod(java.lang.Class klass, java.lang.String methodName, java.lang.Class[] parameters)
public static java.lang.Object getProperty(java.lang.Object target, java.lang.String propertyName)