public class PropertyUtils extends Object
Extracted from the BTM project and re-licensed under Apache 2.0 license.
© Bitronix 2005, 2006, 2007
| Constructor and Description |
|---|
PropertyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Class<?>> |
getAllImplementedInterfaces(Class clazz)
Gets all implemented interfaces of a class.
|
static Map |
getProperties(Object target)
Builds a map of direct javabeans properties of the target object.
|
static Object |
getProperty(Object target,
String propertyName)
Gets a direct or indirect property (dotted property: prop1.prop2.prop3) on the target object.
|
static void |
setProperties(Object target,
Map properties)
Sets a map of properties on the target object.
|
static void |
setProperty(Object target,
String propertyName,
Object propertyValue)
Sets a direct or indirect property (dotted property: prop1.prop2.prop3) on the target object.
|
public static Set<Class<?>> getAllImplementedInterfaces(Class clazz)
public static void setProperty(Object target, String propertyName, 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 Map getProperties(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 Object getProperty(Object target, 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(Object target, Map properties) throws PropertyException
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.Copyright © 2016. All Rights Reserved.