Package com.avoka.core.util
Class PropertyUtils
java.lang.Object
com.avoka.core.util.PropertyUtils
Provides Property Utilities.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Return the property value for the given object and property name using the MVEL library.static boolean
hasSetterMethod
(Object object, String propertyName) Return true if the given object has the setter method with the given property name.static void
Return the property value for the given object and property name using the MVEL library.static void
Return the property value for the given object and property name using the MVEL library.
-
Constructor Details
-
PropertyUtils
public PropertyUtils()
-
-
Method Details
-
getValue
Return the property value for the given object and property name using the MVEL library. This method is thread-safe, and caches parsed MVEL expressions in an cache.- Parameters:
source
- the source objectname
- the name of the property- Returns:
- the property value for the given source object and property name
-
setValue
Return the property value for the given object and property name using the MVEL library. This method is thread-safe, and caches parsed MVEL expressions in an cache.- Parameters:
target
- the target object to set the property ofname
- the name of the property to setvalue
- the property value to set
-
setValue
Return the property value for the given object and property name using the MVEL library. This method is thread-safe, and caches parsed MVEL expressions in an cache.- Parameters:
target
- the target object to set the property ofname
- the name of the property to setvalue
- the property value to setlogErrors
- log any property setting errors
-
hasSetterMethod
Return true if the given object has the setter method with the given property name.- Parameters:
object
- the target object to testpropertyName
- the property name to test- Returns:
- true if the given object has the setter method with the given property name
- Since:
- 4.2.0
-