public static GrReflectedMethod @NotNull [] doCreateReflectedMethods(@NotNull GrMethod targetMethod,
                                                                       @Nullable PsiClassType categoryType,
                                                                       GrParameter @NotNull [] parameters) {
    int count = 0;
    for (GrParameter parameter : parameters) {
      if (parameter.isOptional()) count++;
    }

    if (count == 0 && categoryType == null) return GrReflectedMethod.EMPTY_ARRAY;

    final GrReflectedMethod[] methods = new GrReflectedMethod[count + 1];
    for (int i = 0; i <= count; i++) {
      methods[i] = new GrReflectedMethodImpl(targetMethod, parameters, count - i, categoryType);
    }

    return methods;
  }
public static GrReflectedMethod @NotNull [] doCreateReflectedMethods(@NotNull GrMethod targetMethod,
                                                                       @Nullable PsiClassType categoryType,
                                                                       GrParameter @NotNull [] parameters)