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 ObjectgetProperty(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 JavaBeanbooleanhasReadableProperty(Object object, String propertyName) Checks to see if a bean has a readable property by a given namebooleanhasWritableProperty(Object object, String propertyName) Checks to see if an object has a writable property by a given namevoidSets an object in a Map or beanprotected voidsetProperty(Object object, String property, Object value) Sets the property.Methods inherited from class 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:
getReadablePropertyNamesin 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:
getWriteablePropertyNamesin 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
-