private static void checkArgument(AnnotationHolder holder, XPathExpression argument, int i, Parameter[] parameters) {
    if (i >= parameters.length) {
      if (parameters.length > 0 && parameters[parameters.length - 1].kind == Parameter.Kind.VARARG) {
        // OK. Validate types against the last declared - vararg - param.
      } else {
        holder.newAnnotation(HighlightSeverity.ERROR, XPathBundle.message("annotator.error.too.many.arguments")).range(argument).create();
      }
    }
  }
private static void checkArgument(AnnotationHolder holder, XPathExpression argument, int i, Parameter[] parameters)