|
|||||||||
| Home >> All >> com >> aendvari >> griffin >> bean >> [ transform overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.aendvari.griffin.bean.transform
Class InspectedBean

java.lang.Objectcom.aendvari.griffin.bean.transform.InspectedBean
- public class InspectedBean
- extends java.lang.Object
Inspects the given bean or class for all get/set methods and stores them for later accessing based on their bean property name
| Nested Class Summary | |
class |
InspectedBean.BeanGetMethod
Internal class used to hold a "get" method |
private class |
InspectedBean.BeanSetMethod
Internal class used to hold a "set" method |
private class |
InspectedBean.HashMapKeyValuePairs
Internal class used to help maintain Map entries for this bean. |
| Field Summary | |
private java.util.HashMap |
beanGetMethods
a HashMap of get methods for this bean. |
private java.lang.Object |
beanObject
the bean object instance |
private java.util.HashMap |
beanSetHashMaps
used internally for maintaining HashMap parameter methods. |
private java.util.HashMap |
beanSetMethods
a HashMap of set methods for this bean. |
| Constructor Summary | |
InspectedBean(java.lang.Class objectType)
Create a new InspectorBean instance. |
|
InspectedBean(java.lang.Object object)
Create a new InspectorBean instance. |
|
InspectedBean(java.lang.String beanType)
Create a new InspectorBean instance. |
|
| Method Summary | |
void |
addSetMethodParamMap(java.lang.String propertyName)
Sets the temporary Map instance into the HashMap method parameter. |
void |
addSetMethodParamMapKey(java.lang.String propertyName,
java.lang.Object key)
Sets the key into the temporary Map for the given property |
void |
addSetMethodParamMapValue(java.lang.String propertyName,
java.lang.Object value)
Sets the value into the temporary Map for the given property |
void |
addSetMethodParamValue(java.lang.String propertyName,
java.lang.Object value)
Set the parameter value of (or add to if array[], Collection or Map) the method. |
void |
createSetMethodParamMap(java.lang.String propertyName)
Create a Map instance for holding key/value pairs of the HashMap method parameter. |
java.lang.Object |
executeGetMethod(java.lang.String propertyName,
java.lang.Object beanObj)
Executes the get method matched to the property name on the give bean object. |
private void |
executeSetMethods()
Executes all set methods for this bean assigning each property the method parameter. |
InspectedBean.BeanGetMethod |
getBeanGetMethod(java.lang.String propertyName)
Returns the get method matched to the property name of the inspected bean. |
java.lang.Object |
getBeanInstance()
Get an instance of the InspectedBean. |
java.lang.Object |
getBeanObject()
Get the bean object. |
java.util.HashMap |
getGetMethods()
Get the HashMap of all the get methods for this bean. |
java.lang.Class |
getSetMethodParamClass(java.lang.String propertyName)
Get the Class type for the set method parameter. |
java.lang.Object |
getSetMethodParamValue(java.lang.String propertyName)
Get the value (as Object) for the set method parameter. |
private void |
initilize()
Initialization of the InspectorBean. |
private void |
retrieveMethods()
Gets all the set/get methods for this bean and store into a HashMap based on their property name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
beanObject
private java.lang.Object beanObject
- the bean object instance
beanSetMethods
private java.util.HashMap beanSetMethods
- a HashMap of set methods for this bean. Key is the property name of the "set".
beanSetHashMaps
private java.util.HashMap beanSetHashMaps
- used internally for maintaining
HashMapparameter methods.
beanGetMethods
private java.util.HashMap beanGetMethods
- a HashMap of get methods for this bean. Key is the property name of the "get".
| Constructor Detail |
InspectedBean
public InspectedBean(java.lang.Object object) throws java.lang.Exception
- Create a new
InspectorBeaninstance.
InspectedBean
public InspectedBean(java.lang.Class objectType) throws java.lang.Exception
- Create a new
InspectorBeaninstance.
InspectedBean
public InspectedBean(java.lang.String beanType) throws java.lang.Exception
- Create a new
InspectorBeaninstance.
| Method Detail |
initilize
private void initilize()
throws java.lang.Exception
- Initialization of the
InspectorBean.
retrieveMethods
private void retrieveMethods()
throws java.lang.Exception
- Gets all the set/get methods for this bean and store into a
HashMapbased on their property name.
getBeanInstance
public java.lang.Object getBeanInstance() throws java.lang.Exception
- Get an instance of the
InspectedBean.
getBeanObject
public java.lang.Object getBeanObject() throws java.lang.Exception
- Get the bean object.
getGetMethods
public java.util.HashMap getGetMethods()
- Get the
HashMapof all the get methods for this bean.
executeGetMethod
public java.lang.Object executeGetMethod(java.lang.String propertyName, java.lang.Object beanObj) throws java.lang.Exception
- Executes the get method matched to the property name on the give bean object.
getBeanGetMethod
public InspectedBean.BeanGetMethod getBeanGetMethod(java.lang.String propertyName) throws java.lang.Exception
- Returns the get method matched to the property name of the inspected bean.
getSetMethodParamClass
public java.lang.Class getSetMethodParamClass(java.lang.String propertyName)
- Get the
Classtype for the set method parameter.
getSetMethodParamValue
public java.lang.Object getSetMethodParamValue(java.lang.String propertyName)
- Get the value (as
Object) for the set method parameter.
addSetMethodParamValue
public void addSetMethodParamValue(java.lang.String propertyName, java.lang.Object value)
- Set the parameter value of (or add to if
array[],CollectionorMap) the method.
executeSetMethods
private void executeSetMethods()
throws java.lang.Exception
- Executes all set methods for this bean assigning each property the method parameter.
createSetMethodParamMap
public void createSetMethodParamMap(java.lang.String propertyName)
- Create a
Mapinstance for holding key/value pairs of theHashMapmethod parameter. This is a temporary set of values used for building aMapof key/value pairs while reading data at different points.createSetMethodParamMap() .. do some stuff .. addSetMethodParamMapKey() <-- you must call (in either order) a set key addSetMethodParamMapValue() <-- and a set value before calling that same <-- one again. ie: setKey, setKey is wrong. .. do some more stuff .. addSetMethodParamMap() <-- this is called after all sets have been made
addSetMethodParamMap
public void addSetMethodParamMap(java.lang.String propertyName)
- Sets the temporary
Mapinstance into theHashMapmethod parameter. Only call this after all data reading has been completed for the Map.
addSetMethodParamMapKey
public void addSetMethodParamMapKey(java.lang.String propertyName, java.lang.Object key)
- Sets the key into the temporary
Mapfor the given property
addSetMethodParamMapValue
public void addSetMethodParamMapValue(java.lang.String propertyName, java.lang.Object value)
- Sets the value into the temporary
Mapfor the given property
|
|||||||||
| Home >> All >> com >> aendvari >> griffin >> bean >> [ transform overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.aendvari.griffin.bean.transform.InspectedBean