org.pentaho.reporting.engine.classic.core.util.beans
Class BeanUtility

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

public final class BeanUtility
extends Object

The BeanUtility class enables access to bean properties using the reflection API.

Author:
Thomas Morgner

Constructor Summary
BeanUtility(Object o)
           
 
Method Summary
 String[] getProperties()
           
 Object getProperty(String name)
           
 String getPropertyAsString(String name)
           
 PropertyDescriptor[] getPropertyInfos()
           
static Class getPropertyType(PropertyDescriptor pd)
           
 Class getPropertyType(String name)
           
static boolean isSameType(Class declared, Class object)
           
 void reconfigure(Object o)
           
 void setProperty(String name, Object o)
           
 void setPropertyAsString(String name, Class type, String txt)
           
 void setPropertyAsString(String name, String txt)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanUtility

public BeanUtility(Object o)
            throws IntrospectionException
Throws:
IntrospectionException
Method Detail

reconfigure

public void reconfigure(Object o)
                 throws IntrospectionException
Throws:
IntrospectionException

getPropertyInfos

public PropertyDescriptor[] getPropertyInfos()

getProperty

public Object getProperty(String name)
                   throws BeanException
Throws:
BeanException

getPropertyAsString

public String getPropertyAsString(String name)
                           throws BeanException
Throws:
BeanException

setProperty

public void setProperty(String name,
                        Object o)
                 throws BeanException
Throws:
BeanException

setPropertyAsString

public void setPropertyAsString(String name,
                                String txt)
                         throws BeanException
Throws:
BeanException

getPropertyType

public Class getPropertyType(String name)
                      throws BeanException
Throws:
BeanException

getPropertyType

public static Class getPropertyType(PropertyDescriptor pd)
                             throws BeanException
Throws:
BeanException

setPropertyAsString

public void setPropertyAsString(String name,
                                Class type,
                                String txt)
                         throws BeanException
Throws:
BeanException

getProperties

public String[] getProperties()
                       throws BeanException
Throws:
BeanException

isSameType

public static boolean isSameType(Class declared,
                                 Class object)