Class BeanUtility
- java.lang.Object
-
- 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
Constructors Constructor Description BeanUtility(Object o)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
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
-
-