Converter (final JavaMethod method) { final Type returnType = method.getGenericReturnType(); final Type type = returnType == void.class ? method.getGenericParameterTypes()[0] : returnType; final Class parameter = DomUtil.substituteGenericType(type, myType); if (parameter == null) { LOG.error(type + " " + myType); } Converter converter = getConverter(new AnnotatedElement() { @Override public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { return myInvocationCache.getMethodAnnotation(method, annotationClass); } }, parameter); if (converter == null && type instanceof TypeVariable) { converter = getConverter(this, DomUtil.getGenericValueParameter(myType)); } if (converter == null) { converter = myManager.getConverterManager().getConverterByClass(parameter); } if (converter == null) { throw new AssertionError("No converter specified: String<->" + parameter.getName() + "; method=" + method + "; place=" + myChildDescription); } return converter; }