Class clazz = (Class) type;
if (clazz.isEnum()) {
return new EnumConverter(locale, clazz);
}
ConverterLookup converterLookup = getConverterLookup();
Converter converter = converterLookup.lookupConverterForType((Class) type);
return converter instanceof SingleValueConverter ? (SingleValueConverter) converter : null;
} else {
return null;
}
}