Package org.dom4j.bean
Class BeanMetaData
- java.lang.Object
-
- org.dom4j.bean.BeanMetaData
-
public class BeanMetaData extends java.lang.Object
BeanMetaData
contains metadata about a bean class.- Version:
- $Revision: 1.10 $
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<?>
beanClass
The class of the beanprivate static DocumentFactory
DOCUMENT_FACTORY
private java.util.Map<java.lang.Object,java.lang.Integer>
nameMap
Index of names and QNames to indices Keys are type of QName and Stringprotected static java.lang.Object[]
NULL_ARGS
Empty arguments for reflection callsprivate java.beans.PropertyDescriptor[]
propertyDescriptors
Property descriptors for the beanprivate QName[]
qNames
QNames for the attributesprivate java.lang.reflect.Method[]
readMethods
Read methods used for getting propertiesprivate static java.util.Map<java.lang.Class<?>,BeanMetaData>
singletonCache
Singleton cacheprivate java.lang.reflect.Method[]
writeMethods
Write methods used for setting properties
-
Constructor Summary
Constructors Constructor Description BeanMetaData(java.lang.Class<?> beanClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
attributeCount()
DOCUMENT ME!BeanAttributeList
createAttributeList(BeanElement parent)
static BeanMetaData
get(java.lang.Class<?> beanClass)
Static helper method to find and cache meta data objects for bean typesjava.lang.Object
getData(int index, java.lang.Object bean)
int
getIndex(java.lang.String name)
int
getIndex(QName qName)
QName
getQName(int index)
protected void
handleException(java.lang.Exception e)
void
setData(int index, java.lang.Object bean, java.lang.Object data)
-
-
-
Field Detail
-
NULL_ARGS
protected static final java.lang.Object[] NULL_ARGS
Empty arguments for reflection calls
-
singletonCache
private static java.util.Map<java.lang.Class<?>,BeanMetaData> singletonCache
Singleton cache
-
DOCUMENT_FACTORY
private static final DocumentFactory DOCUMENT_FACTORY
-
beanClass
private java.lang.Class<?> beanClass
The class of the bean
-
propertyDescriptors
private java.beans.PropertyDescriptor[] propertyDescriptors
Property descriptors for the bean
-
qNames
private QName[] qNames
QNames for the attributes
-
readMethods
private java.lang.reflect.Method[] readMethods
Read methods used for getting properties
-
writeMethods
private java.lang.reflect.Method[] writeMethods
Write methods used for setting properties
-
nameMap
private java.util.Map<java.lang.Object,java.lang.Integer> nameMap
Index of names and QNames to indices Keys are type of QName and String
-
-
Method Detail
-
get
public static BeanMetaData get(java.lang.Class<?> beanClass)
Static helper method to find and cache meta data objects for bean types- Parameters:
beanClass
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
attributeCount
public int attributeCount()
DOCUMENT ME!- Returns:
- the number of attribtutes for this bean type
-
createAttributeList
public BeanAttributeList createAttributeList(BeanElement parent)
-
getQName
public QName getQName(int index)
-
getIndex
public int getIndex(java.lang.String name)
-
getIndex
public int getIndex(QName qName)
-
getData
public java.lang.Object getData(int index, java.lang.Object bean)
-
setData
public void setData(int index, java.lang.Object bean, java.lang.Object data)
-
handleException
protected void handleException(java.lang.Exception e)
-
-