try {
beanInfo = Introspector.getBeanInfo(type, Object.class);
} catch (IntrospectionException e) {
throw new ObjectAccessException("Cannot get BeanInfo of type " + type.getName(), e);
}
nameMap = new OrderRetainingMap();
propertyNameCache.put(type, nameMap);
PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
for (int i = 0; i < propertyDescriptors.length; i++) {
PropertyDescriptor descriptor = propertyDescriptors[i];
nameMap.put(descriptor.getName(), descriptor);