Package com.avoka.core.util
Class PropertyReader
- java.lang.Object
-
- com.avoka.core.util.PropertyReader
-
public final class PropertyReader extends Object
Provides a object property reader utilties class. This class is derived from Apache Click.- Since:
- 5.0.0
-
-
Constructor Summary
Constructors Constructor Description PropertyReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
getObjectValue(Object source, String name, Map cache)
Return the property value for the given object and property name.static Object
getValue(Object source, String name)
Return the property value for the given object and property name.static Object
getValue(Object source, String name, Map cache)
Return the property value for the given object and property name.
-
-
-
Method Detail
-
getValue
public static Object getValue(Object source, String name)
Return the property value for the given object and property name. This method uses reflection internally to get the property value. This method is thread-safe, and caches reflected accessor methods in an internal synchronized cache. If the given source object is a Map this method will simply return the value for the given key name.- Parameters:
source
- the source objectname
- the name of the property- Returns:
- the property value for the given source object and property name
-
getValue
public static Object getValue(Object source, String name, Map cache)
Return the property value for the given object and property name. This method uses reflection internally to get the property value. This method is thread-safe, and caches reflected accessor methods in an internal synchronized cache. If the given source object is a Map this method will simply return the value for the given key name.- Parameters:
source
- the source objectname
- the name of the propertycache
- the method reflection cache- Returns:
- the property value for the given source object and property name
-
getObjectValue
public static Object getObjectValue(Object source, String name, Map cache)
Return the property value for the given object and property name. This method uses reflection internally to get the property value. This method is thread-safe, and caches reflected accessor methods in an internal synchronized cache. If the given source object is a Map this method will try return the value for the given key name respecting the dots.- Parameters:
source
- the source objectname
- the name of the propertycache
- the method reflection cache- Returns:
- the property value for the given source object and property name
- Since:
- 5.0.1
-
-