* 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();
}
}