Package eu.woolplatform.utils.beans
Class PropertyReader
- java.lang.Object
-
- eu.woolplatform.utils.beans.PropertyReader
-
public class PropertyReader extends Object
This class can read the value of a property from a JavaBeans-like object. A property may be accessed by a public field or getter and setter methods.- See Also:
PropertyScanner
-
-
Constructor Summary
Constructors Constructor Description PropertyReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectreadProperty(Object obj, PropertySpec propSpec)Reads the value of the specified property.static ObjectreadProperty(Object obj, String property)Reads the value of the specified property.
-
-
-
Method Detail
-
readProperty
public static Object readProperty(Object obj, String property)
Reads the value of the specified property.- Parameters:
obj- the objectproperty- the property name- Returns:
- the property value
-
readProperty
public static Object readProperty(Object obj, PropertySpec propSpec)
Reads the value of the specified property.- Parameters:
obj- the objectpropSpec- the property specification- Returns:
- the property value
-
-