public class PropertyUtils
extends java.lang.Object
| Constructor and Description |
|---|
PropertyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map |
getProperties(java.lang.Object target)
Build a map of direct javabeans properties of the target object.
|
static java.lang.Object |
getProperty(java.lang.Object target,
java.lang.String propertyName)
Get a direct or indirect property (dotted property: prop1.prop2.prop3) on the target object.
|
static java.lang.String |
propertiesToString(java.lang.Object obj)
Return a comma-separated String of r/w properties of the specified object.
|
static void |
setProperties(java.lang.Object target,
java.util.Map properties)
Set a
Map of direct or indirect properties on the target object. |
static void |
setProperty(java.lang.Object target,
java.lang.String propertyName,
java.lang.Object propertyValue)
Set a direct or indirect property (dotted property: prop1.prop2.prop3) on the target object.
|
public static void setProperty(java.lang.Object target,
java.lang.String propertyName,
java.lang.Object propertyValue)
throws PropertyException
target - the target object on which to set the property.propertyName - the name of the property to set.propertyValue - the value of the property to set.PropertyException - if an error happened while trying to set the property.public static java.util.Map getProperties(java.lang.Object target)
throws PropertyException
target - the target object from which to get properties names.PropertyException - if an error happened while trying to get a property.public static java.lang.Object getProperty(java.lang.Object target,
java.lang.String propertyName)
throws PropertyException
target - the target object from which to get the property.propertyName - the name of the property to get.PropertyException - if an error happened while trying to get the property.public static void setProperties(java.lang.Object target,
java.util.Map properties)
throws PropertyException
Map of direct or indirect properties on the target object.target - the target object on which to set the properties.properties - a Map of String/Object pairs.PropertyException - if an error happened while trying to set a property.public static java.lang.String propertiesToString(java.lang.Object obj)
obj - the object to introspect.Copyright © 2006-2021 Bitronix Software. All Rights Reserved.