for (Method annotationMethod : getAnnotationMethods(clazz, method, annotation.annotationType())) {
try {
annotationProvider
.setValue(annotationMethod.getName(), annotationMethod.invoke(annotation));
} catch (IllegalArgumentException e) {
throw new AnnotationNotFoundException("Annotation: "
+ annotation.annotationType().getName(), e);
} catch (IllegalAccessException e) {
throw new AnnotationNotFoundException("Annotation: "
+ annotation.annotationType().getName(), e);
} catch (InvocationTargetException e) {
throw new AnnotationNotFoundException("Annotation: "
+ annotation.annotationType().getName(), e);
}
}
builder.addAnnotation(annotationProvider);
}