Example usage for java.beans BeanInfo getAdditionalBeanInfo

List of usage examples for java.beans BeanInfo getAdditionalBeanInfo

Introduction

In this page you can find the example usage for java.beans BeanInfo getAdditionalBeanInfo.

Prototype

BeanInfo[] getAdditionalBeanInfo();

Source Link

Document

This method enables the current BeanInfo object to return an arbitrary collection of other BeanInfo objects that provide additional information about the current bean.

Usage

From source file:BeanPropertyTableModel.java

private void processBeanInfo(BeanInfo info, Vector<Object> columnData)
        throws InvocationTargetException, IllegalAccessException {
    BeanInfo[] extra = info.getAdditionalBeanInfo();
    if (extra != null) {
        for (int i = 0; i < extra.length; ++i) {
            processBeanInfo(extra[i], columnData);
        }/*from  www.jav a  2s  .c  o  m*/
    }

    PropertyDescriptor[] propDesc = info.getPropertyDescriptors();
    for (int i = 0; i < propDesc.length; ++i) {
        final String propName = propDesc[i].getName();
        final Method getter = propDesc[i].getReadMethod();
        if (propName != null && getter != null) {
            Vector<Object> line = generateLine(propName, _bean, getter);
            if (line != null) {
                columnData.add(line);
            }
        }
    }
}