public static void createTemplateForMethod(ChooseTypeExpression[] paramTypesExpressions,
                                             PsiMethod method,
                                             PsiClass owner,
                                             TypeConstraint[] constraints,
                                             boolean isConstructor,
                                             @NotNull final PsiElement context) {
    ParameterNameExpression[] nameExpressions = new ParameterNameExpression[paramTypesExpressions.length];
    for (int i = 0; i < nameExpressions.length; i++) {
      nameExpressions[i] = StringParameterNameExpression.Companion.getEMPTY();
    }

    ChooseTypeExpression returnTypeExpression = new ChooseTypeExpression(
      constraints,
      owner.getManager(),
      context.getResolveScope(),
      method.getLanguage() == GroovyLanguage.INSTANCE
    );
    createTemplateForMethod(paramTypesExpressions, nameExpressions, method, owner, returnTypeExpression, isConstructor, true, context);
  }
public static void createTemplateForMethod(ChooseTypeExpression[] paramTypesExpressions,
                                             PsiMethod method,
                                             PsiClass owner,
                                             TypeConstraint[] constraints,
                                             boolean isConstructor,
                                             @NotNull final PsiElement context)