}
}
private MetaData createMetaData(PropertyDescriptor prop) {
MetaData metaData = null;
// JW: cannot cope with indexedPropertyTypes (?)
// they seem to return null for getPropertyType
if (Number.class.isAssignableFrom(prop.getPropertyType())) {
metaData = new NumberMetaData(
prop.getName(),
prop.getPropertyType(),
prop.getDisplayName());
} else if (isNumberType(prop))
{
// convert the primitive types to their boxed types
// this makes the binding code happier in
// AbstractBinding#convertToModelType
metaData = new NumberMetaData(
prop.getName(),
primitivesToBoxed.get(prop.getPropertyType()),
prop.getDisplayName());
// JW: really??
metaData.setRequired(true);
} else {
Class type = prop.getPropertyType();
if (primitivesToBoxed.get(type) != null) {
type = primitivesToBoxed.get(type);
}
metaData = new MetaData(prop.getName(), type, prop
.getDisplayName());
}
return metaData;
}