/** * Performs introspection of a specific Java class. This implementation uses * the {@code java.beans.Introspector.getBeanInfo()} method to obtain * all property descriptors for the current class and adds them to the * passed in introspection context. * * @param icontext the introspection context */ public void introspect(final IntrospectionContext icontext) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(icontext.getTargetClass()); } catch (final IntrospectionException e) { // no descriptors are added to the context log.error( "Error when inspecting class " + icontext.getTargetClass(), e); return; } PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors(); if (descriptors == null) { descriptors = new PropertyDescriptor[0]; } handleIndexedPropertyDescriptors(icontext.getTargetClass(), descriptors); icontext.addPropertyDescriptors(descriptors); }
/** * Performs introspection of a specific Java class. This implementation uses * the {@code java.beans.Introspector.getBeanInfo()} method to obtain * all property descriptors for the current class and adds them to the * passed in introspection context. * * @param icontext the introspection context */ public void introspect(final IntrospectionContext icontext) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(icontext.getTargetClass()); } catch (final IntrospectionException e) { // no descriptors are added to the context log.error( "Error when inspecting class " + icontext.getTargetClass(), e); return; } PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors(); if (descriptors == null) { descriptors = new PropertyDescriptor[0]; } handleIndexedPropertyDescriptors(icontext.getTargetClass(), descriptors); icontext.addPropertyDescriptors(descriptors); }
/** * Performs introspection of a specific Java class. This implementation uses * the {@code java.beans.Introspector.getBeanInfo()} method to obtain * all property descriptors for the current class and adds them to the * passed in introspection context. * * @param icontext the introspection context */ public void introspect(final IntrospectionContext icontext) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(icontext.getTargetClass()); } catch (final IntrospectionException e) { // no descriptors are added to the context log.error( "Error when inspecting class " + icontext.getTargetClass(), e); return; } PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors(); if (descriptors == null) { descriptors = new PropertyDescriptor[0]; } handleIndexedPropertyDescriptors(icontext.getTargetClass(), descriptors); icontext.addPropertyDescriptors(descriptors); }