|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectraccoon.core.bean.descriptor.BeanDescriptor
public class BeanDescriptor
Contains all the valid property methods linked to a class.
The information contained within this instance is relative to a java bean that complies either to the Raccoon or Castor specification of a java bean. This class complies to that specification and so do the samples provided inraccoon.samples.beans.* (see tutorial)
| Constructor Summary | |
|---|---|
BeanDescriptor()
|
|
| Method Summary | |
|---|---|
void |
addProperty(IBeanProperty pProperty)
Adds a new bean property to the current list of bean properties |
int |
analyzeProperties()
Parses all the properties assigned to this instance in order to set correctly the fields. |
boolean |
containsProperty(java.lang.String pPropertyName)
Determines whether or not the property is contained by this instance. |
java.lang.String |
getClassName()
The class that this instance bears information on. |
IBeanProperty |
getProperty(java.lang.String pPropertyName)
Convenience method for retrieving a specific property descriptor. |
boolean |
hasDefaultConstructor()
Is the associated java bean dynamically instanciable. |
boolean |
isCastorBean()
Convenience method for determining the type of bean this instance is. |
boolean |
isParsed()
Have the methods assigned to this instance been analyzed to determine the type of bean. |
boolean |
isRaccoonBean()
Convenience method for determining the type of bean this instance is. |
java.util.Iterator<IBeanProperty> |
properties()
The list of avaible properties of this java bean instance. |
java.util.Iterator |
propertyNames()
The names of the available java bean properties within this BeanDescriptor. |
void |
setClassName(java.lang.String pClassName)
Defines the name of the class that this instance represents. |
void |
setDefaultConstructor(boolean pHasDefaultConstructor)
Sets the property related to the existence of a default constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanDescriptor()
| Method Detail |
|---|
public java.lang.String getClassName()
getClassName in interface IBeanDescriptorsetClassName(String)public void setClassName(java.lang.String pClassName)
Person class, then pClassName is worth
Person.class.getName()
setClassName in interface IBeanDescriptorpClassName - the class name contained in this objectisParsed()public void addProperty(IBeanProperty pProperty)
addProperty in interface IBeanDescriptorpProperty - the bean property to add.isParsed()
public IBeanProperty getProperty(java.lang.String pPropertyName)
throws RaccoonException
IBeanProperty.lPropertyName()
getProperty in interface IBeanDescriptorpPropertyName - the lower bean name of the property (for example: nameOfPerson and not
NameOfPerson
RaccoonException - if the property wasn't found.containsProperty(String)public java.util.Iterator propertyNames()
propertyNames in interface IBeanDescriptorString which are the java property names of the given java bean
public java.util.Iterator<IBeanProperty> properties()
throws IntrospectionException
properties in interface IBeanDescriptorIBeanProperty elements
IntrospectionException - if the method analyzeProperties() wasn't called previously.public boolean containsProperty(java.lang.String pPropertyName)
containsProperty in interface IBeanDescriptorpPropertyName - the lower bean name of the property (for example: nameOfPerson and not
NameOfPerson
true if there is a property descriptor for the specified property.public boolean isParsed()
isParsed in interface IBeanDescriptortrue if the properties have been analyzed (the class becomes read only)public boolean isCastorBean()
isParsed() returns true.
isCastorBean in interface IBeanDescriptorpublic boolean isRaccoonBean()
isParsed() returns true.
isRaccoonBean in interface IBeanDescriptor
public int analyzeProperties()
throws IntrospectionException
isAtomic, isCastorBean and isRaccoonBean
analyzeProperties in interface IBeanDescriptorIntrospectionException - if some props wheren't set or if the component is in errorpublic boolean hasDefaultConstructor()
hasDefaultConstructor in interface IBeanDescriptortrue if there is a default constructor.public void setDefaultConstructor(boolean pHasDefaultConstructor)
pHasDefaultConstructor - true if this bean has a default constructor.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||