| java.lang.Object com.ibatis.common.beans.BaseProbe com.ibatis.common.beans.ComplexBeanProbe
ComplexBeanProbe | public class ComplexBeanProbe extends BaseProbe (Code) | | 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);
|
Method Summary | |
public Object | getObject(Object object, String name) | protected Object | getProperty(Object object, String name) | public Class | getPropertyTypeForGetter(Object object, String name) Returns the class that the getter will return when reading a property value. | public Class | getPropertyTypeForSetter(Object object, String name) Returns the class that the setter expects to receive as a parameter when
setting a property value. | public String[] | getReadablePropertyNames(Object object) | public String[] | getWriteablePropertyNames(Object object) | public boolean | hasReadableProperty(Object object, String propertyName) | public boolean | hasWritableProperty(Object object, String propertyName) | public void | setObject(Object object, String name, Object value) | protected void | setProperty(Object object, String name, Object value) |
ComplexBeanProbe | protected ComplexBeanProbe()(Code) | | |
getObject | public Object getObject(Object object, String name)(Code) | | Gets an Object property from a bean
Parameters: object - The bean Parameters: name - The property name The property value (as an Object) |
getPropertyTypeForGetter | public Class getPropertyTypeForGetter(Object object, String name)(Code) | | Returns the class that the getter will return when reading a property value.
Parameters: object - The bean to check Parameters: name - The name of the property The type of the property |
getPropertyTypeForSetter | public Class getPropertyTypeForSetter(Object object, String name)(Code) | | Returns the class that the setter expects to receive as a parameter when
setting a property value.
Parameters: object - The bean to check Parameters: name - The name of the property The type of the property |
getReadablePropertyNames | public String[] getReadablePropertyNames(Object object)(Code) | | Returns an array of the readable properties exposed by a bean
Parameters: object - The bean The properties |
getWriteablePropertyNames | public String[] getWriteablePropertyNames(Object object)(Code) | | Returns an array of the writeable properties exposed by a bean
Parameters: object - The bean The properties |
hasReadableProperty | public boolean hasReadableProperty(Object object, String propertyName)(Code) | | Checks to see if a bean has a readable property be a given name
Parameters: object - The bean to check Parameters: propertyName - The property to check for True if the property exists and is readable |
hasWritableProperty | public boolean hasWritableProperty(Object object, String propertyName)(Code) | | Checks to see if a bean has a writable property be a given name
Parameters: object - The bean to check Parameters: propertyName - The property to check for True if the property exists and is writable |
setObject | public void setObject(Object object, String name, Object value)(Code) | | Sets the value of a bean property to an Object
Parameters: object - The bean to change Parameters: name - The name of the property to set Parameters: value - The new value to set |
|
|