Top Description Fields Constructors Methods
org.dom4j.bean

public Class BeanMetaData

extends Object
Class Inheritance
Imports
java.beans.BeanInfo, .IntrospectionException, .Introspector, .PropertyDescriptor, java.lang.reflect.Method, java.util.HashMap, .Map, org.dom4j.DocumentFactory, .QName

BeanMetaData contains metadata about a bean class.

Author
James Strachan
Version
$Revision: 1.10 $

Field Summary

Modifier and TypeField and Description
private Class<?>
beanClass

The class of the bean

private static final DocumentFactory
private Map<Object, Integer>
nameMap

Index of names and QNames to indices Keys are type of QName and String

protected static final Object[]
NULL_ARGS

Empty arguments for reflection calls

private PropertyDescriptor[]
propertyDescriptors

Property descriptors for the bean

private QName[]
qNames

QNames for the attributes

private Method[]
readMethods

Read methods used for getting properties

private static Map<Class<?>, BeanMetaData>
singletonCache

Singleton cache

private Method[]
writeMethods

Write methods used for setting properties

Constructor Summary

AccessConstructor and Description
public
BeanMetaData(Class<?> beanClass)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of attribtutes for this bean type
attributeCount
()

DOCUMENT ME!

public BeanAttributeList
public static BeanMetaData

Returns:

DOCUMENT ME!
get
(Class<?>
DOCUMENT ME!
beanClass
)

Static helper method to find and cache meta data objects for bean types

public Object
getData(int index, Object bean)

public int
public int
getIndex(QName qName)

public QName
getQName(int index)

protected void
public void
setData(int index, Object bean, Object data)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beanClassback to summary
private Class<?> beanClass

The class of the bean

DOCUMENT_FACTORYback to summary
private static final DocumentFactory DOCUMENT_FACTORY
nameMapback to summary
private Map<Object, Integer> nameMap

Index of names and QNames to indices Keys are type of QName and String

NULL_ARGSback to summary
protected static final Object[] NULL_ARGS

Empty arguments for reflection calls

propertyDescriptorsback to summary
private PropertyDescriptor[] propertyDescriptors

Property descriptors for the bean

qNamesback to summary
private QName[] qNames

QNames for the attributes

readMethodsback to summary
private Method[] readMethods

Read methods used for getting properties

singletonCacheback to summary
private static Map<Class<?>, BeanMetaData> singletonCache

Singleton cache

writeMethodsback to summary
private Method[] writeMethods

Write methods used for setting properties

Constructor Detail

BeanMetaDataback to summary
public BeanMetaData(Class<?> beanClass)

Method Detail

attributeCountback to summary
public int attributeCount()

DOCUMENT ME!

Returns:int

the number of attribtutes for this bean type

createAttributeListback to summary
public BeanAttributeList createAttributeList(BeanElement parent)
getback to summary
public static BeanMetaData get(Class<?> beanClass)

Static helper method to find and cache meta data objects for bean types

Parameters
beanClass:Class<?>

DOCUMENT ME!

Returns:BeanMetaData

DOCUMENT ME!

getDataback to summary
public Object getData(int index, Object bean)
getIndexback to summary
public int getIndex(String name)
getIndexback to summary
public int getIndex(QName qName)
getQNameback to summary
public QName getQName(int index)
handleExceptionback to summary
protected void handleException(Exception e)
setDataback to summary
public void setData(int index, Object bean, Object data)