Method readMethod = pd.getReadMethod();
Class propertyType = readMethod == null ? pd.getPropertyType() : GenericsUtils.extractGenericReturnType(
beanType, readMethod);
PropertyAdapter pa = new PropertyAdapterImpl(this, pd.getName(), propertyType, readMethod, pd
.getWriteMethod());
adapters.put(pa.getName(), pa);
}
// Now, add any public fields (even if static) that do not conflict
for (Field f : beanType.getFields())
{
String name = f.getName();
if (!adapters.containsKey(name))
{
Class propertyType = GenericsUtils.extractGenericFieldType(beanType, f);
PropertyAdapter pa = new PropertyAdapterImpl(this, name, propertyType, f);
adapters.put(name, pa);
}
}
}