|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibatis.common.beans.BaseProbe
com.ibatis.common.beans.MapProbe
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);
Field Summary | |
private static BaseProbe |
PROBE
|
Constructor Summary | |
protected |
MapProbe()
|
Method Summary | |
java.lang.Object |
getObject(java.lang.Object object,
java.lang.String name)
Gets an Object property from a bean |
protected java.lang.Object |
getProperty(java.lang.Object object,
java.lang.String name)
|
java.lang.Class |
getPropertyTypeForGetter(java.lang.Object object,
java.lang.String name)
Returns the class that the getter will return when reading a property value. |
java.lang.Class |
getPropertyTypeForSetter(java.lang.Object object,
java.lang.String name)
Returns the class that the setter expects to receive as a parameter when setting a property value. |
java.lang.String[] |
getReadablePropertyNames(java.lang.Object object)
Returns an array of the readable properties exposed by a bean |
java.lang.String[] |
getWriteablePropertyNames(java.lang.Object object)
Returns an array of the writeable properties exposed by a bean |
boolean |
hasReadableProperty(java.lang.Object object,
java.lang.String propertyName)
Checks to see if a bean has a readable property be a given name |
boolean |
hasWritableProperty(java.lang.Object object,
java.lang.String propertyName)
Checks to see if a bean has a writable property be a given name |
void |
setObject(java.lang.Object object,
java.lang.String name,
java.lang.Object value)
Sets the value of a bean property to an Object |
protected void |
setProperty(java.lang.Object object,
java.lang.String name,
java.lang.Object value)
|
Methods inherited from class com.ibatis.common.beans.BaseProbe |
getIndexedProperty, setIndexedProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final BaseProbe PROBE
Constructor Detail |
protected MapProbe()
Method Detail |
public java.lang.String[] getReadablePropertyNames(java.lang.Object object)
getReadablePropertyNames
in class BaseProbe
object
- The bean
public java.lang.String[] getWriteablePropertyNames(java.lang.Object object)
getWriteablePropertyNames
in class BaseProbe
object
- The bean
public java.lang.Class getPropertyTypeForSetter(java.lang.Object object, java.lang.String name)
getPropertyTypeForSetter
in interface Probe
object
- The bean to checkname
- The name of the property
public java.lang.Class getPropertyTypeForGetter(java.lang.Object object, java.lang.String name)
getPropertyTypeForGetter
in interface Probe
object
- The bean to checkname
- The name of the property
public boolean hasWritableProperty(java.lang.Object object, java.lang.String propertyName)
hasWritableProperty
in interface Probe
object
- The bean to checkpropertyName
- The property to check for
public boolean hasReadableProperty(java.lang.Object object, java.lang.String propertyName)
hasReadableProperty
in interface Probe
object
- The bean to checkpropertyName
- The property to check for
protected java.lang.Object getProperty(java.lang.Object object, java.lang.String name)
getProperty
in class BaseProbe
protected void setProperty(java.lang.Object object, java.lang.String name, java.lang.Object value)
setProperty
in class BaseProbe
public java.lang.Object getObject(java.lang.Object object, java.lang.String name)
getObject
in interface Probe
object
- The beanname
- The property name
public void setObject(java.lang.Object object, java.lang.String name, java.lang.Object value)
setObject
in interface Probe
object
- The bean to changename
- The name of the property to setvalue
- The new value to set
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |