Package gnu.java.beans

Examples of gnu.java.beans.IntrospectionIncubator


   *    the bean data.
   */
  public static BeanInfo getBeanInfo(Class<?> beanClass, int flag)
    throws IntrospectionException
  {
    IntrospectionIncubator ii;
    BeanInfoEmbryo infoEmbryo;
   
    switch(flag)
    {
      case USE_ALL_BEANINFO:
        return getBeanInfo(beanClass);
      case IGNORE_IMMEDIATE_BEANINFO:
        Class superclass = beanClass.getSuperclass();
        ExplicitInfo explicit = new ExplicitInfo(superclass, null);
       
        ii = new IntrospectionIncubator();
        if (explicit.explicitEventSetDescriptors != null)
          ii.setEventStopClass(superclass);
       
        if (explicit.explicitMethodDescriptors != null)
          ii.setMethodStopClass(superclass);
       
        if (explicit.explicitPropertyDescriptors != null)
          ii.setPropertyStopClass(superclass);
       
        ii.addMethods(beanClass.getMethods());

        infoEmbryo = ii.getBeanInfoEmbryo();
        merge(infoEmbryo, explicit);

        infoEmbryo.setBeanDescriptor(new BeanDescriptor(beanClass, null));
       
        return infoEmbryo.getBeanInfo();
      case IGNORE_ALL_BEANINFO:
      default:
        ii = new IntrospectionIncubator();
        ii.addMethods(beanClass.getMethods());
        infoEmbryo = ii.getBeanInfoEmbryo();
        infoEmbryo.setBeanDescriptor(new BeanDescriptor(beanClass, null));
       
        return infoEmbryo.getBeanInfo();
    }
  }
View Full Code Here


  public static BeanInfo getBeanInfo(Class<?> beanClass, Class<?> stopClass)
    throws IntrospectionException
  {
    ExplicitInfo explicit = new ExplicitInfo(beanClass, stopClass);

    IntrospectionIncubator ii = new IntrospectionIncubator();
    ii.setPropertyStopClass(explicit.propertyStopClass);
    ii.setEventStopClass(explicit.eventStopClass);
    ii.setMethodStopClass(explicit.methodStopClass);
    ii.addMethods(beanClass.getMethods());
   
    BeanInfoEmbryo currentInfo = ii.getBeanInfoEmbryo();
   
    merge(currentInfo, explicit);
   
    //  Sets the info's BeanDescriptor to the one we extracted from the
    // explicit BeanInfo instance(s) if they contained one. Otherwise we
View Full Code Here

TOP

Related Classes of gnu.java.beans.IntrospectionIncubator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.