Package com.ibatis.common.beans
Interface Probe
- All Known Implementing Classes:
BaseProbe
,ComplexBeanProbe
,DomProbe
,GenericProbe
public interface Probe
A Probe is an object that is used to work with beans, DOM objects, or other objects.
-
Method Summary
Modifier and TypeMethodDescriptionGets an Object property from another object.getPropertyTypeForGetter
(Object object, String name) Returns the class that the getter will return when reading a property.getPropertyTypeForSetter
(Object object, String name) Returns the class that the setter expects when setting a property.boolean
hasReadableProperty
(Object object, String propertyName) Checks to see if an object has a readable property by a given name.boolean
hasWritableProperty
(Object object, String propertyName) Checks to see if an object has a writable property by a given name.void
Sets the value of a property on an object.
-
Method Details
-
getObject
Gets an Object property from another object.- Parameters:
object
- - the objectname
- - the property name- Returns:
- The property value (as an Object)
-
setObject
Sets the value of a property on an object.- Parameters:
object
- - the object to changename
- - the name of the property to setvalue
- - the new value to set
-
getPropertyTypeForSetter
Returns the class that the setter expects when setting a property.- Parameters:
object
- - the object to checkname
- - the name of the property- Returns:
- The type of the property
-
getPropertyTypeForGetter
Returns the class that the getter will return when reading a property.- Parameters:
object
- - the object to checkname
- - the name of the property- Returns:
- The type of the property
-
hasWritableProperty
Checks to see if an object has a writable property by a given name.- Parameters:
object
- - the object to checkpropertyName
- - the property to check for- Returns:
- True if the property exists and is writable
-
hasReadableProperty
Checks to see if an object has a readable property by a given name.- Parameters:
object
- - the object to checkpropertyName
- - the property to check for- Returns:
- True if the property exists and is readable
-