com.ibatis.common.beans

Interface Probe

public interface Probe

A Probe is an object that is used to work with beans, DOM objects, or other objects.
Method Summary
ObjectgetObject(Object object, String name)
Gets an Object property from another object
ClassgetPropertyTypeForGetter(Object object, String name)
Returns the class that the getter will return when reading a property
ClassgetPropertyTypeForSetter(Object object, String name)
Returns the class that the setter expects when setting a property
booleanhasReadableProperty(Object object, String propertyName)
Checks to see if an object has a readable property by a given name
booleanhasWritableProperty(Object object, String propertyName)
Checks to see if an object has a writable property by a given name
voidsetObject(Object object, String name, Object value)
Sets the value of a property on an object

Method Detail

getObject

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

Parameters: object - the object name - the property name

Returns: The property value (as an Object)

getPropertyTypeForGetter

public Class getPropertyTypeForGetter(Object object, 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

getPropertyTypeForSetter

public Class getPropertyTypeForSetter(Object object, 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

hasReadableProperty

public boolean hasReadableProperty(Object object, 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

hasWritableProperty

public boolean hasWritableProperty(Object object, 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

setObject

public void setObject(Object object, String name, 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

Copyright © 2011. All Rights Reserved.