|
Oracle® Fusion Middleware Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.stellent.wcm.common.utils.BeanUtil
public abstract class BeanUtil
Utility methods for dealing with JavaBean objects and properties
| Nested Class Summary | |
|---|---|
static class |
BeanUtil.PropertyType |
| Constructor Summary | |
|---|---|
BeanUtil() |
|
| Method Summary | ||
|---|---|---|
static
|
convertType(java.lang.String value, java.lang.Class<T> type)Convert the object into the given type |
|
static java.lang.Object |
getBeanProperty(java.lang.Object bean, java.lang.String name, boolean ignoreCase)Get a bean property. |
|
static java.util.Set<java.lang.String> |
getBeanPropertyNames(java.lang.Class beanClass, BeanUtil.PropertyType type)Get a set of the bean properties |
|
static java.lang.Object |
getPrivilegedProperty(java.lang.Object instance, java.lang.String propertyName)Retrieves a privilged property |
|
static
|
instantiateBean(java.lang.Class<T> type, java.lang.String className, java.util.Map<java.lang.String,java.lang.Object> properties)Instantiate an object. |
|
static
|
instantiateBean(java.lang.ClassLoader classLoader, java.lang.Class<T> type, java.lang.String className, java.util.Map<java.lang.String,java.lang.Object> properties)Instantiate an object |
|
static void |
populateBean(java.lang.Object bean, java.util.Map<java.lang.String,?> properties)Populate a bean using the JavaBean properties methods that correspond to the keys in the properties map. |
|
static boolean |
setBeanProperty(java.lang.Object bean, java.lang.String name, java.lang.Object value, boolean ignoreCase)Set a bean property |
|
static void |
setPrivilegedProperty(java.lang.Class clazz, java.lang.Object instance, java.lang.String propertyName, java.lang.Object propertyValue)Sets a privilged 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 void setPrivilegedProperty(java.lang.Class clazz,
java.lang.Object instance,
java.lang.String propertyName,
java.lang.Object propertyValue)
throws java.lang.IllegalAccessException
java.lang.IllegalAccessException
public static java.lang.Object getPrivilegedProperty(java.lang.Object instance,
java.lang.String propertyName)
throws java.lang.IllegalAccessException
java.lang.IllegalAccessException
public static void populateBean(java.lang.Object bean,
java.util.Map<java.lang.String,?> properties)
throws java.lang.Exception
bean - the bean to populateproperties - a mapping of property name to property valuejava.lang.Exception - if an error occurs
public static <T> T instantiateBean(java.lang.Class<T> type,
java.lang.String className,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws java.lang.Exception
type - the type of objectclassName - the classnameproperties - (optional) a mapping of bean properties to valuejava.lang.Exception
public static <T> T instantiateBean(java.lang.ClassLoader classLoader,
java.lang.Class<T> type,
java.lang.String className,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws java.lang.Exception
classLoader - the classloader to usetype - the type of objectclassName - the classnameproperties - (optional) a mapping of bean properties to valuejava.lang.Exception
public static <T> T convertType(java.lang.String value,
java.lang.Class<T> type)
value -type -
public static boolean setBeanProperty(java.lang.Object bean,
java.lang.String name,
java.lang.Object value,
boolean ignoreCase)
throws java.lang.Exception
bean - the bean objectname - the property namevalue - the property valueignoreCase - property name inspection case insensitive if true, false otherwise.java.lang.Exception - if an error occurs during reflection
public static java.util.Set<java.lang.String> getBeanPropertyNames(java.lang.Class beanClass,
BeanUtil.PropertyType type)
throws java.lang.Exception
beanClass - the bean classtype - the property typejava.lang.Exception - if an error occurs during reflection
public static java.lang.Object getBeanProperty(java.lang.Object bean,
java.lang.String name,
boolean ignoreCase)
throws java.lang.Exception
bean - the bean objectname - the property nameignoreCase - property name inspection case insensitive if true, false otherwise.java.lang.Exception - if an error occurs during reflection
|
Oracle® Fusion Middleware Site Studio for External Applications Java API Reference 11g Release 1 (11.1.1) E17273-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||