|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.util.BeanUtil
Bean utilities.
Constructor Summary | |
BeanUtil()
|
Method Summary | |
static java.lang.Object |
configure(java.lang.Object obj,
RegistryNode config)
Configure but allow implicit init-param. |
static java.lang.Object |
configure(java.lang.Object obj,
RegistryNode config,
java.util.HashMap pathVariableMap,
Path pwd,
boolean allowImplicit,
boolean isRequired)
Sets the properties for a bean by calling setXXX for each init-param. |
static java.lang.Object |
configureOptional(java.lang.Object obj,
RegistryNode config)
Configure but allow implicit init-param. |
static java.lang.Object |
createBean(RegistryNode node,
java.util.HashMap variableMap,
Path pwd)
Instantiate and configure a bean. |
static java.lang.Object |
createBean(RegistryNode node,
java.util.HashMap variableMap,
Path pwd,
java.lang.String className)
Instantiate and configure a bean. |
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 java.lang.Object |
instantiate(RegistryNode node,
java.lang.String className)
|
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 |
setBeanProperty(java.lang.Object obj,
java.lang.String name,
java.lang.String value)
Configures a single bean property. |
static void |
setBeanProperty(java.lang.Object obj,
java.lang.String name,
java.lang.String value,
java.beans.BeanInfo info,
RegistryNode config,
java.util.HashMap pathVariableMap,
Path pwd,
boolean isRequired)
Configures a single bean property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BeanUtil()
Method Detail |
public static java.lang.Object createBean(RegistryNode node, java.util.HashMap variableMap, Path pwd) throws RegistryException
public static java.lang.Object createBean(RegistryNode node, java.util.HashMap variableMap, Path pwd, java.lang.String className) throws RegistryException
public static java.lang.Object instantiate(RegistryNode node, java.lang.String className) throws RegistryException
public static java.lang.Object configure(java.lang.Object obj, RegistryNode config) throws RegistryException
public static java.lang.Object configureOptional(java.lang.Object obj, RegistryNode config) throws RegistryException
public static java.lang.Object configure(java.lang.Object obj, RegistryNode config, java.util.HashMap pathVariableMap, Path pwd, boolean allowImplicit, boolean isRequired) throws RegistryException
object
- the beanconfig
- the resin.conf configuration nodepublic static void setBeanProperty(java.lang.Object obj, java.lang.String name, java.lang.String value) throws RegistryException
obj
- the bean to configureconfig
- the configuration node (for error messages)name
- the property namevalue
- the property namepublic static void setBeanProperty(java.lang.Object obj, java.lang.String name, java.lang.String value, java.beans.BeanInfo info, RegistryNode config, java.util.HashMap pathVariableMap, Path pwd, boolean isRequired) throws RegistryException
obj
- the bean to configurename
- the property namevalue
- the property valueinfo
- the bean's introspected infoconfig
- the configuration node (for error messages)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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |