code: private static <A extends Annotation> A getParameterAnnotation(Method method,
              int index, Class<A> annotationClass) {
          for (Annotation a : method.getParameterAnnotations()[index]) {
              if (annotationClass.isInstance(a)) {
                  return annotationClass.cast(a);
              }
          }
          return null;
      }
docs: Find an annotation for a parameter on a method.
  
  @param <A> The annotation.
  @param method The method.
  @param index The index (0 .. n-1) of the parameter in the parameters list
  @param annotationClass The annotation class
  @return The annotation, or null