org.mule.util
Class BeanUtils

java.lang.Object
  extended by org.apache.commons.beanutils.BeanUtils
      extended by org.mule.util.BeanUtils

public class BeanUtils
extends BeanUtils

BeanUtils provides functions for altering the way commons BeanUtils works


Field Summary
static java.lang.String SET_PROPERTIES_METHOD
           
 
Constructor Summary
BeanUtils()
           
 
Method Summary
static java.util.Map describe(java.lang.Object object)
          The Apache BeanUtils version of this converts all values to String, which is pretty useless, it also includes stuff not defined by the user
static java.util.Map<java.lang.String,java.lang.Object> describeBean(java.lang.Object object)
          Similar to describe(Object) except that it will only populate bean properties where there is a valid getter and setter method.
static void populate(java.lang.Object bean, java.util.Map props)
          This will overlay a map of properties on a bean.
static void populateWithoutFail(java.lang.Object object, java.util.Map props, boolean logWarnings)
          Exception safe version of BeanUtils.populate()
 
Methods inherited from class org.apache.commons.beanutils.BeanUtils
cloneBean, copyProperties, copyProperty, createCache, getArrayProperty, getCacheFast, getDebug, getIndexedProperty, getIndexedProperty, getMappedProperty, getMappedProperty, getNestedProperty, getProperty, getSimpleProperty, initCause, setCacheFast, setDebug, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SET_PROPERTIES_METHOD

public static final java.lang.String SET_PROPERTIES_METHOD
See Also:
Constant Field Values
Constructor Detail

BeanUtils

public BeanUtils()
Method Detail

populateWithoutFail

public static void populateWithoutFail(java.lang.Object object,
                                       java.util.Map props,
                                       boolean logWarnings)
Exception safe version of BeanUtils.populate()

Parameters:
object - the object to set the properties on
props - the map of properties to set
logWarnings - whether exception warnings should be logged

populate

public static void populate(java.lang.Object bean,
                            java.util.Map props)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.InvocationTargetException
This will overlay a map of properties on a bean. This method will validate that all properties are available on the bean before setting the properties

Parameters:
bean - the bean on which to set the properties
props - a Map of properties to set on the bean
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

describe

public static java.util.Map describe(java.lang.Object object)
The Apache BeanUtils version of this converts all values to String, which is pretty useless, it also includes stuff not defined by the user

Parameters:
object - the object to Describe
Returns:
a map of the properties on the object

describeBean

public static java.util.Map<java.lang.String,java.lang.Object> describeBean(java.lang.Object object)
Similar to describe(Object) except that it will only populate bean properties where there is a valid getter and setter method. Basically this method will describe a bean and honour its encapsulation.

Parameters:
object - the object to describe
Returns:
a map of published properties


Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.