public static GrParameter @NotNull [] addEnclosingInstanceParam(@NotNull GrMethod method,
                                                                  @NotNull PsiClass enclosingClass,
                                                                  GrParameter @NotNull [] originalParams,
                                                                  boolean isOptional) {
    final PsiClassType enclosingClassType = JavaPsiFacade.getElementFactory(method.getProject()).createType(enclosingClass, PsiSubstitutor.EMPTY);
    final GrLightParameter enclosing = new GrLightParameter("enclosing", enclosingClassType, method);
    if (isOptional) {
      enclosing.setOptional(true);
      enclosing.setInitializerGroovy(GroovyPsiElementFactory.getInstance(method.getProject()).createExpressionFromText("null"));
    }
    return ArrayUtil.prepend(enclosing, originalParams);
  }
public static GrParameter @NotNull [] addEnclosingInstanceParam(@NotNull GrMethod method,
                                                                  @NotNull PsiClass enclosingClass,
                                                                  GrParameter @NotNull [] originalParams,
                                                                  boolean isOptional)