private ChooseTypeExpression @NotNull [] setupParams(@NotNull PsiMethod method, PsiType @NotNull [] argTypes, @NotNull JVMElementFactory factory) {
    final PsiParameterList parameterList = method.getParameterList();

    ChooseTypeExpression[] paramTypesExpressions = new ChooseTypeExpression[argTypes.length];
    for (int i = 0; i < argTypes.length; i++) {
      PsiType argType = TypesUtil.unboxPrimitiveTypeWrapper(argTypes[i]);
      if (argType == null || argType == PsiTypes.nullType()) argType = TypesUtil.getJavaLangObject(getRefExpr());
      final PsiParameter p = factory.createParameter("o", argType);
      parameterList.add(p);
      TypeConstraint[] constraints = {SupertypeConstraint.create(argType)};
      boolean isGroovy = method.getLanguage() == GroovyLanguage.INSTANCE;
      paramTypesExpressions[i] = new ChooseTypeExpression(constraints, method.getManager(), method.getResolveScope(), isGroovy);
    }
    return paramTypesExpressions;
  }
private ChooseTypeExpression @NotNull [] setupParams(@NotNull PsiMethod method, PsiType @NotNull [] argTypes, @NotNull JVMElementFactory factory)