class ClassUtil {

    public static void collectBeanInfo(Class<?> clazz,
            Map<String, PropertyDescriptor> name2descriptor) {
        Logger log = LoggerFactory.getLogger(ClassUtil.class);
        BeanInfo info = null;
        try {
            info = Introspector.getBeanInfo(clazz);
        } catch (Exception ex) {
            if (log.isDebugEnabled()) {
                log.debug("Cannot inspect class " + clazz, ex);
            }
        }
        if (info == null) {
            return;
        }
        for (PropertyDescriptor pd : info.getPropertyDescriptors()) {
            pd.setValue("type", pd.getPropertyType());
            pd.setValue("resolvableAtDesignTime", Boolean.TRUE);
            name2descriptor.put(pd.getName(), pd);
        }
    }

    private  ClassUtil();

}