public class BeanUtil
extends java.lang.Object
Constructor and Description |
---|
BeanUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class |
getBeanPropertyClass(java.lang.Object obj,
java.lang.String name)
Returns the bean property type.
|
static java.lang.reflect.Method |
getBeanPropertyMethod(java.lang.Object obj,
java.lang.String name)
Returns the bean property type.
|
static java.lang.reflect.Method |
getGetMethod(java.beans.BeanInfo info,
java.lang.String propertyName)
Returns a set method matching the property name.
|
static java.lang.reflect.Method |
getGetMethod(java.lang.Class cl,
java.lang.String propertyName)
Returns a get method matching the property name.
|
static java.lang.reflect.Method |
getGetMethod(java.lang.Class cl,
java.lang.String propertyName,
boolean ignoreCase)
Returns a get method matching the property name.
|
static java.lang.reflect.Method |
getSetMethod(java.beans.BeanInfo info,
java.lang.String propertyName)
Returns a set method matching the property name.
|
static java.lang.reflect.Method |
getSetMethod(java.lang.Class cl,
java.lang.String propertyName)
Returns a set method matching the property name.
|
static java.lang.reflect.Method |
getSetMethod(java.lang.Class cl,
java.lang.String propertyName,
boolean ignoreCase)
Returns a set method matching the property name.
|
static Path |
lookupPath(java.lang.String pathName,
java.util.HashMap varMap,
Path pwd)
Returns the native path for a configured path name.
|
static java.lang.String |
methodNameToPropertyName(java.beans.BeanInfo info,
java.lang.String methodName)
Converts a user's property name to a bean method name.
|
static java.lang.String |
methodNameToPropertyName(java.lang.String methodName)
Converts a user's property name to a bean method name.
|
static java.lang.String |
propertyNameToMethodName(java.lang.String propertyName)
Converts a user's property name to a bean method name.
|
static void |
validateClass(java.lang.Class cl,
java.lang.Class parent) |
public static java.lang.Class getBeanPropertyClass(java.lang.Object obj, java.lang.String name)
obj
- the bean objectname
- the property namepublic static java.lang.reflect.Method getBeanPropertyMethod(java.lang.Object obj, java.lang.String name)
obj
- the bean objectname
- the property namepublic static void validateClass(java.lang.Class cl, java.lang.Class parent) throws RegistryException
RegistryException
public static Path lookupPath(java.lang.String pathName, java.util.HashMap varMap, Path pwd)
pathName
- the configuration path name.varMap
- the map of path variables.pwd
- the default path.public static java.lang.reflect.Method getSetMethod(java.beans.BeanInfo info, java.lang.String propertyName)
public static java.lang.reflect.Method getSetMethod(java.lang.Class cl, java.lang.String propertyName)
public static java.lang.reflect.Method getSetMethod(java.lang.Class cl, java.lang.String propertyName, boolean ignoreCase)
public static java.lang.reflect.Method getGetMethod(java.beans.BeanInfo info, java.lang.String propertyName)
public static java.lang.reflect.Method getGetMethod(java.lang.Class cl, java.lang.String propertyName)
public static java.lang.reflect.Method getGetMethod(java.lang.Class cl, java.lang.String propertyName, boolean ignoreCase)
public static java.lang.String propertyNameToMethodName(java.lang.String propertyName)
propertyName
- the user property namepublic static java.lang.String methodNameToPropertyName(java.beans.BeanInfo info, java.lang.String methodName)
methodName
- the method namepublic static java.lang.String methodNameToPropertyName(java.lang.String methodName)
methodName
- the method name