|
|||||||||||
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.GenericProbe
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 |
BEAN_PROBE
|
private static BaseProbe |
DOM_PROBE
|
private static BaseProbe |
MAP_PROBE
|
Constructor Summary | |
protected |
GenericProbe()
|
Method Summary | |
private java.lang.Class |
getClassPropertyTypeForGetter(java.lang.Class type,
java.lang.String name)
|
private java.lang.Class |
getClassPropertyTypeForSetter(java.lang.Class type,
java.lang.String name)
|
java.lang.Object |
getObject(java.lang.Object object,
java.lang.String name)
Gets an object from a Map or bean |
protected java.lang.Object |
getProperty(java.lang.Object object,
java.lang.String property)
|
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)
Gets an array of the readable properties in a Map or JavaBean |
java.lang.String[] |
getWriteablePropertyNames(java.lang.Object object)
Gets an array of the writeable properties in a Map or JavaBean |
boolean |
hasReadableProperty(java.lang.Object object,
java.lang.String propertyName)
Checks to see if a bean 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 an object in a Map or bean |
protected void |
setProperty(java.lang.Object object,
java.lang.String property,
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 MAP_PROBE
private static final BaseProbe BEAN_PROBE
private static final BaseProbe DOM_PROBE
Constructor Detail |
protected GenericProbe()
Method Detail |
public java.lang.Object getObject(java.lang.Object object, java.lang.String name)
object
- - the object to probename
- - the name of the property (or map entry)
Probe.getObject(java.lang.Object, java.lang.String)
public void setObject(java.lang.Object object, java.lang.String name, java.lang.Object value)
object
- - the object to probename
- - the name of the property (or map entry)value
- - the new value of the property (or map entry)Probe.setObject(java.lang.Object, java.lang.String, java.lang.Object)
public java.lang.String[] getReadablePropertyNames(java.lang.Object object)
getReadablePropertyNames
in class BaseProbe
object
- - the object to get properties for
BaseProbe.getReadablePropertyNames(java.lang.Object)
public java.lang.String[] getWriteablePropertyNames(java.lang.Object object)
getWriteablePropertyNames
in class BaseProbe
object
- - the object to get properties for
BaseProbe.getWriteablePropertyNames(java.lang.Object)
public java.lang.Class getPropertyTypeForSetter(java.lang.Object object, java.lang.String name)
object
- - The class to checkname
- - the name of the property
Probe.getPropertyTypeForSetter(java.lang.Object, java.lang.String)
public java.lang.Class getPropertyTypeForGetter(java.lang.Object object, java.lang.String name)
object
- The bean to checkname
- The name of the property
Probe.getPropertyTypeForGetter(java.lang.Object, java.lang.String)
public boolean hasWritableProperty(java.lang.Object object, java.lang.String propertyName)
object
- The bean to checkpropertyName
- The property to check for
Probe.hasWritableProperty(java.lang.Object, java.lang.String)
public boolean hasReadableProperty(java.lang.Object object, java.lang.String propertyName)
object
- The bean to checkpropertyName
- The property to check for
Probe.hasReadableProperty(java.lang.Object, java.lang.String)
protected void setProperty(java.lang.Object object, java.lang.String property, java.lang.Object value)
setProperty
in class BaseProbe
protected java.lang.Object getProperty(java.lang.Object object, java.lang.String property)
getProperty
in class BaseProbe
private java.lang.Class getClassPropertyTypeForSetter(java.lang.Class type, java.lang.String name)
private java.lang.Class getClassPropertyTypeForGetter(java.lang.Class type, java.lang.String name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |