com.ibatis.common.beans
Interface Probe

All Known Implementing Classes:
BaseProbe

public interface Probe

A Probe is an object that is used to work with beans, DOM objects, or other objects.


Method Summary
 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
 

Method Detail

getObject

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

Parameters:
object - - the object
name - - the property name
Returns:
The property value (as an Object)

setObject

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

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

getPropertyTypeForSetter

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

Parameters:
object - - the object to check
name - - the name of the property
Returns:
The type of the property

getPropertyTypeForGetter

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

Parameters:
object - - the object to check
name - - the name of the property
Returns:
The type of the property

hasWritableProperty

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

Parameters:
object - - the object to check
propertyName - - the property to check for
Returns:
True if the property exists and is writable

hasReadableProperty

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

Parameters:
object - - the object to check
propertyName - - the property to check for
Returns:
True if the property exists and is readable