converters.put(Long.class, new LongConverter());
}
@SuppressWarnings("unchecked")
public Object convert(Class<?> type, String object) {
AbstractConverter abstractConverter;
if (Enum.class.isAssignableFrom(type)) {
abstractConverter = new EnumConverter((Class<? extends Enum>) type);
} else {
abstractConverter = converters.get(type);
}
if (abstractConverter != null) {
return abstractConverter.convertToObject(object, Locale.getDefault());
} else {
return object;
}
}