{
public InjectionHandler createInjectionHandler(Annotation annotation, Class clazz, PropertyDescriptor propertyDescriptor)
{
InjectRequestParameter input = (InjectRequestParameter) annotation;
Class converterClass = input.converter();
Converter converter = RequestParameterFactory.createConverter(propertyDescriptor.getPropertyType(), converterClass);
String parameterName = AnnotationFactoryUtils.getAttributeName(propertyDescriptor.getName(), input.name());
boolean required = input.required();
// make sure that converter has String generic type
boolean ok = ReflectHelper.checkGenericType(converterClass, Converter.class, String.class);
if (!ok)
{
Class sourceType = ReflectHelper.getGenericType(converterClass, Converter.class);
throw new ApplicationConfigurationException("@" + input.annotationType().getSimpleName() + " in "
+ clazz.getName() + " uses converter " + converterClass.getName()
+ " whose conversion source type is " + sourceType.getName() + ", and not "
+ String.class.getName());
}