Class BeanMetaData

java.lang.Object
org.dom4j.bean.BeanMetaData

public class BeanMetaData extends Object

BeanMetaData contains metadata about a bean class.

Version:
$Revision: 1.10 $
  • Field Details

    • NULL_ARGS

      protected static final Object[] NULL_ARGS
      Empty arguments for reflection calls
    • singletonCache

      private static Map<Class<?>, BeanMetaData> singletonCache
      Singleton cache
    • DOCUMENT_FACTORY

      private static final DocumentFactory DOCUMENT_FACTORY
    • beanClass

      private Class<?> beanClass
      The class of the bean
    • propertyDescriptors

      private PropertyDescriptor[] propertyDescriptors
      Property descriptors for the bean
    • qNames

      private QName[] qNames
      QNames for the attributes
    • readMethods

      private Method[] readMethods
      Read methods used for getting properties
    • writeMethods

      private Method[] writeMethods
      Write methods used for setting properties
    • nameMap

      private Map<Object,Integer> nameMap
      Index of names and QNames to indices Keys are type of QName and String
  • Constructor Details

    • BeanMetaData

      public BeanMetaData(Class<?> beanClass)
  • Method Details

    • get

      public static BeanMetaData get(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(String name)
    • getIndex

      public int getIndex(QName qName)
    • getData

      public Object getData(int index, Object bean)
    • setData

      public void setData(int index, Object bean, Object data)
    • handleException

      protected void handleException(Exception e)