org.apache.commons.betwixt
Class XMLIntrospector.JavaBeanType

java.lang.Object
  extended by org.apache.commons.betwixt.XMLIntrospector.BeanType
      extended by org.apache.commons.betwixt.XMLIntrospector.JavaBeanType
Enclosing class:
XMLIntrospector

private class XMLIntrospector.JavaBeanType
extends XMLIntrospector.BeanType

Supports standard Java Beans


Field Summary
private  java.lang.Class beanClass
          Bean class
private  java.beans.BeanInfo beanInfo
          Introspected bean
private  java.lang.String name
          Bean name
private  BeanProperty[] properties
          Bean properties
 
Constructor Summary
XMLIntrospector.JavaBeanType(java.beans.BeanInfo beanInfo)
          Constructs a BeanType for a standard Java Bean
 
Method Summary
private  void addAllSuperinterfaces(java.lang.Class clazz, java.util.ArrayList propertyDescriptors)
          Adds all super interfaces.
 java.lang.String getBeanName()
          Gets the name for this bean type
 java.lang.Class getElementType()
          Gets the type to be used by the associated element
 BeanProperty[] getProperties()
          Gets the properties associated with this bean.
 boolean isLoopType()
          Is this type a loop?
 boolean isMapType()
          is this type a map?
 boolean isPrimitiveType()
          Is this type a primitive?
 
Methods inherited from class org.apache.commons.betwixt.XMLIntrospector.BeanType
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

beanInfo

private java.beans.BeanInfo beanInfo
Introspected bean


beanClass

private java.lang.Class beanClass
Bean class


name

private java.lang.String name
Bean name


properties

private BeanProperty[] properties
Bean properties

Constructor Detail

XMLIntrospector.JavaBeanType

public XMLIntrospector.JavaBeanType(java.beans.BeanInfo beanInfo)
Constructs a BeanType for a standard Java Bean

Parameters:
beanInfo - the BeanInfo describing the standard Java Bean, not null
Method Detail

getElementType

public java.lang.Class getElementType()
Description copied from class: XMLIntrospector.BeanType
Gets the type to be used by the associated element

Specified by:
getElementType in class XMLIntrospector.BeanType
Returns:
a Class that is the type not null
See Also:
#getElementType

getBeanName

public java.lang.String getBeanName()
Description copied from class: XMLIntrospector.BeanType
Gets the name for this bean type

Specified by:
getBeanName in class XMLIntrospector.BeanType
Returns:
the bean type name, not null
See Also:
XMLIntrospector.BeanType.getBeanName()

isPrimitiveType

public boolean isPrimitiveType()
Description copied from class: XMLIntrospector.BeanType
Is this type a primitive?

Specified by:
isPrimitiveType in class XMLIntrospector.BeanType
Returns:
true if this type should be treated by betwixt as a primitive
See Also:
XMLIntrospector.BeanType.isPrimitiveType()

isLoopType

public boolean isLoopType()
Description copied from class: XMLIntrospector.BeanType
Is this type a loop?

Specified by:
isLoopType in class XMLIntrospector.BeanType
Returns:
true if this should be treated as a loop
See Also:
XMLIntrospector.BeanType.isLoopType()

isMapType

public boolean isMapType()
Description copied from class: XMLIntrospector.BeanType
is this type a map?

Specified by:
isMapType in class XMLIntrospector.BeanType
Returns:
true this should be treated as a map.
See Also:
XMLIntrospector.BeanType.isMapType()

getProperties

public BeanProperty[] getProperties()
Description copied from class: XMLIntrospector.BeanType
Gets the properties associated with this bean.

Specified by:
getProperties in class XMLIntrospector.BeanType
Returns:
the BeanProperty's, not null
See Also:
XMLIntrospector.BeanType.getProperties()

addAllSuperinterfaces

private void addAllSuperinterfaces(java.lang.Class clazz,
                                   java.util.ArrayList propertyDescriptors)
Adds all super interfaces. Super interface methods are not returned within the usual bean info for an interface.

Parameters:
clazz - Class, not null
propertyDescriptors - ArrayList of PropertyDescriptors', not null