Package com.ibatis.common.beans
Class GenericProbe
java.lang.Object
com.ibatis.common.beans.BaseProbe
com.ibatis.common.beans.GenericProbe
- All Implemented Interfaces:
Probe
StaticBeanProbe provides methods that allow simple, reflective access to JavaBeans style properties. Methods are
provided for all simple types as well as object types.
Examples:
StaticBeanProbe.setObject(object, propertyName, value);
Object value = StaticBeanProbe.getObject(object, propertyName);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets an object from a Map or beanprotected Object
getProperty
(Object object, String property) Gets the property.getPropertyTypeForGetter
(Object object, String name) Returns the class that the getter will return when reading a property value.getPropertyTypeForSetter
(Object object, String name) Returns the class that the setter expects to receive as a parameter when setting a property value.String[]
getReadablePropertyNames
(Object object) Gets an array of the readable properties in a Map or JavaBeanString[]
getWriteablePropertyNames
(Object object) Gets an array of the writeable properties in a Map or JavaBeanboolean
hasReadableProperty
(Object object, String propertyName) Checks to see if a bean has a readable property by a given nameboolean
hasWritableProperty
(Object object, String propertyName) Checks to see if an object has a writable property by a given namevoid
Sets an object in a Map or beanprotected void
setProperty
(Object object, String property, Object value) Sets the property.Methods inherited from class com.ibatis.common.beans.BaseProbe
getIndexedProperty, getIndexedType, setIndexedProperty
-
Constructor Details
-
GenericProbe
protected GenericProbe()Instantiates a new generic probe.
-
-
Method Details
-
getObject
-
setObject
-
getReadablePropertyNames
Gets an array of the readable properties in a Map or JavaBean- Specified by:
getReadablePropertyNames
in classBaseProbe
- Parameters:
object
- - the object to get properties for- Returns:
- The array of properties (or map entries)
- See Also:
-
getWriteablePropertyNames
Gets an array of the writeable properties in a Map or JavaBean- Specified by:
getWriteablePropertyNames
in classBaseProbe
- Parameters:
object
- - the object to get properties for- Returns:
- The array of properties (or map entries)
- See Also:
-
getPropertyTypeForSetter
-
getPropertyTypeForGetter
-
hasWritableProperty
-
hasReadableProperty
-
setProperty
-
getProperty
-