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.


方法摘要
 java.lang.Object getObject(java.lang.Object object, java.lang.String name)
          Gets an Object property from another object
 java.lang.Class getPropertyTypeForGetter(java.lang.Object object, java.lang.String name)
          Returns the class that the getter will return when reading a property
 java.lang.Class getPropertyTypeForSetter(java.lang.Object object, java.lang.String name)
          Returns the class that the setter expects when setting a property
 boolean hasReadableProperty(java.lang.Object object, java.lang.String propertyName)
          Checks to see if an object has a readable property by a given name
 boolean hasWritableProperty(java.lang.Object object, java.lang.String propertyName)
          Checks to see if an object has a writable property by a given name
 void setObject(java.lang.Object object, java.lang.String name, java.lang.Object value)
          Sets the value of a property on an object
 

方法详细信息

getObject

java.lang.Object getObject(java.lang.Object object,
                           java.lang.String name)
Gets an Object property from another object

参数:
object - - the object
name - - the property name
返回:
The property value (as an Object)

setObject

void setObject(java.lang.Object object,
               java.lang.String name,
               java.lang.Object value)
Sets the value of a property on an object

参数:
object - - the object to change
name - - the name of the property to set
value - - the new value to set

getPropertyTypeForSetter

java.lang.Class getPropertyTypeForSetter(java.lang.Object object,
                                         java.lang.String name)
Returns the class that the setter expects when setting a property

参数:
object - - the object to check
name - - the name of the property
返回:
The type of the property

getPropertyTypeForGetter

java.lang.Class getPropertyTypeForGetter(java.lang.Object object,
                                         java.lang.String name)
Returns the class that the getter will return when reading a property

参数:
object - - the object to check
name - - the name of the property
返回:
The type of the property

hasWritableProperty

boolean hasWritableProperty(java.lang.Object object,
                            java.lang.String propertyName)
Checks to see if an object has a writable property by a given name

参数:
object - - the object to check
propertyName - - the property to check for
返回:
True if the property exists and is writable

hasReadableProperty

boolean hasReadableProperty(java.lang.Object object,
                            java.lang.String propertyName)
Checks to see if an object has a readable property by a given name

参数:
object - - the object to check
propertyName - - the property to check for
返回:
True if the property exists and is readable