|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object raccoon.core.bean.descriptor.BeanProperty
public class BeanProperty
The default property descriptor for the Raccoon Framework.
The are two different types of bean properties:public void
setName(String pName)
public String getName()
public void setStudentMarks(Vector
pSemesterMarks)
public Vector getStudentMarks()
public void
addStudentMark()
Constructor Summary | |
---|---|
BeanProperty(java.lang.reflect.Method pGetMethod,
java.lang.reflect.Method pSetMethod)
Intialises this instance and links it to a method. |
|
BeanProperty(java.lang.reflect.Method pGetMethod,
java.lang.reflect.Method pSetMethod,
java.lang.reflect.Method pAddMethod)
Intialises this instance and links it to a method |
Method Summary | |
---|---|
java.lang.reflect.Method |
adder()
Returns the adder for this bean, used to add an element to a collection of a java bean. |
void |
append(java.lang.Object pInstance,
java.lang.Object pData)
Adds an element to this object, this object being a collection! |
java.lang.Class |
beanType()
Returns the type of class that this method handles. |
java.lang.Class |
collectionType()
Returns the atomic type of the collection, a call to this method is valid only if isCollectionProperty returns true |
java.lang.reflect.Method |
getter()
Returns the getter for this bean, used to invoke the getter of a java bean. |
boolean |
isCastorProperty()
Checks if this property is a valid Castor property. |
boolean |
isCollectionProperty()
Checks if this class is a Collection defined by the Raccoon project. |
boolean |
isRaccoonProperty()
Checks if this property is a valid Raccoon property. |
java.lang.String |
lPropertyName()
Extracts the name of this property. |
java.lang.Object |
read(java.lang.Object pInstance)
Reads the value of this property from a given object instance. |
java.lang.reflect.Method |
setter()
Returns the setter for this bean, used to invoke the setter of a java bean. |
java.lang.String |
uPropertyName()
Extracts the name of this property |
void |
write(java.lang.Object pInstance,
java.lang.Object pData)
Sets the value of this object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanProperty(java.lang.reflect.Method pGetMethod, java.lang.reflect.Method pSetMethod) throws IntrospectionException
pGetMethod
- the get method to which this instance is to be attached.pSetMethod
- the set method to which this instance is to be attached.
IntrospectionException
- if parseMethods()
failspublic BeanProperty(java.lang.reflect.Method pGetMethod, java.lang.reflect.Method pSetMethod, java.lang.reflect.Method pAddMethod) throws IntrospectionException
pGetMethod
- the get method to which this instance is to be attached.pSetMethod
- the set method to which this instance is to be attached.pAddMethod
- the add method to which this instance is to be attached.
IntrospectionException
- if the get/set/add method signatures don't match (i.e. differents types)Method Detail |
---|
public boolean isCastorProperty()
public void setName(String pName)
public String getName()
public void setName(String pName)
public int getName()
public void setName(String pName, String pSurname)
public String getName()
isCastorProperty
in interface IBeanProperty
true
if this is a valid Castor property.public boolean isRaccoonProperty()
addElement
method must exist.
isRaccoonProperty
in interface IBeanProperty
true
if this is a valid Raccoon property.public boolean isCollectionProperty()
isCollectionProperty
in interface IBeanProperty
true
if this method is a collection.public java.lang.String lPropertyName()
lPropertyName
in interface IBeanProperty
public java.lang.String uPropertyName()
uPropertyName
in interface IBeanProperty
public java.lang.Class beanType()
public void setString(String pParam)
public String getString()
public void setVector(Vector pParam)
public Vector getVector()
public void addVector(Object pElt)
public void setElements(Vector pParam)
public Vector getElements()
public void addElement(Object pElt)
collectionType()
beanType
in interface IBeanProperty
public java.lang.Class collectionType()
isCollectionProperty
returns true
collectionType
in interface IBeanProperty
public java.lang.reflect.Method getter()
beanType()
.
getter
in interface IBeanProperty
public java.lang.reflect.Method setter()
beanType()
.
setter
in interface IBeanProperty
public java.lang.reflect.Method adder()
collectionType()
.
adder
in interface IBeanProperty
public java.lang.Object read(java.lang.Object pInstance)
read
in interface IBeanProperty
pInstance
- the instance of the object on which the getter will be invoked.
null
if the invocation failed.public void write(java.lang.Object pInstance, java.lang.Object pData) throws RaccoonException
write
in interface IBeanProperty
pInstance
- the instance of the object on which the setter will be invoked.pData
- the data that passed on to the setter that will be invoked.
RaccoonException
- if the setter and object pData don't match.public void append(java.lang.Object pInstance, java.lang.Object pData) throws RaccoonException
append
in interface IBeanProperty
pInstance
- the instance of the object on which the adder will be invoked.pData
- the data that passed on to the adder that will be invoked.
RaccoonException
- if the adder and object pData don't match.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |