code: public static int getAnnotatedParameterIndex(Method method, Class<? extends Annotation> annotationClass) {
          Annotation[][] annotationsForParameters = method.getParameterAnnotations();
          for (int i = 0; i < annotationsForParameters.length; i++) {
              Annotation[] parameterAnnotations = annotationsForParameters[i];
              if (hasAnnotation(parameterAnnotations, annotationClass)) {
                  return i;
              }
          }
          return -1;
      }
docs: Returns index of the first parameter with matching annotationClass, -1 if no parameter
  found with the supplied annotation.
  
  @param method           Method to inspect parameters of.
  @param annotationClass  Annotation to look for.
  
  @return index of the first parameter found with annotationClass, -1 if not parameter found.