/* * ImplicitAccessLevelBeanInfo.java * * Created on April 21, 2006, 3:58 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package org.das2.beans; import org.das2.beans.AccessLevelBeanInfo.AccessLevel; import org.das2.beans.AccessLevelBeanInfo.PersistenceLevel; import org.das2.beans.AccessLevelBeanInfo.Property; import java.beans.BeanInfo; import java.beans.IndexedPropertyDescriptor; import java.beans.PropertyDescriptor; /** * ImplicitAccessLevelBeanInfo makes any BeanInfo class look like an AccessLevelBeanInfo by implementing * the default access level and persistence level settings. * * @author Jeremy */ public class ImplicitAccessLevelBeanInfo extends AccessLevelBeanInfo { //BeanInfo beanInfo; /** Creates a new instance of ImplicitAccessLevelBeanInfo */ private ImplicitAccessLevelBeanInfo( BeanInfo beanInfo, Class beanClass, Property[] properties ) { super( properties, beanClass ); //this.beanInfo= beanInfo; } public static ImplicitAccessLevelBeanInfo create( BeanInfo beanInfo, Class beanClass ) { Property[] properties; PropertyDescriptor[] pds = BeansUtil.getPropertyDescriptors( beanClass ); String[] propertyNameList= BeansUtil.getPropertyNames( pds ); properties= new Property[propertyNameList.length]; for ( int i=0; i