});
ReflectionUtils.doWithMethods(beanType, new ReflectionUtils.MethodCallback() {
@Override
public void doWith(final Method method) throws IllegalArgumentException, IllegalAccessException {
final ExceptionHandler exceptionHandler = AnnotationUtils
.findAnnotation(method, ExceptionHandler.class);
if (exceptionHandler != null) {
if (AnnotationUtils.findAnnotation(method, Attribute.class) != null
|| AnnotationUtils.findAnnotation(method, Before.class) != null
|| AnnotationUtils.findAnnotation(method, Uri.class) != null) {
throw new RuntimeException(
String.format(
"Cannot combine @Before, @Attribute @ExceptionHandler or @Uri on a single method. Method: %s",
ClassUtils.getQualifiedMethodName(method)));
}
handlerMethods.getExceptionHandlerMethods().add(
new ExceptionHandlerMethod(exceptionHandler.value(), method));
}
}
});
final List<org.springframework.extensions.webscripts.WebScript> webScripts = new ArrayList<org.springframework.extensions.webscripts.WebScript>();
ReflectionUtils.doWithMethods(beanType, new ReflectionUtils.MethodCallback() {