private void addMethodConflicts(MultiMap<PsiElement, String> conflicts) {
    try {
      GrMethod prototype;
      final PsiMethod method = myChangeInfo.getMethod();
      if (!(method instanceof GrMethod)) return;

      PsiManager manager = method.getManager();
      GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(manager.getProject());
      final CanonicalTypes.Type returnType = myChangeInfo.getNewReturnType();
      String newMethodName = myChangeInfo.getNewName();
      if (method.isConstructor()) {
        prototype = factory.createConstructorFromText("foo", ArrayUtilRt.EMPTY_STRING_ARRAY, ArrayUtilRt.EMPTY_STRING_ARRAY, "{}", method);
      }
      else {
        prototype = factory.createMethodFromText("", "foo", returnType != null ? returnType.getTypeText() : null,
                                                 ArrayUtilRt.EMPTY_STRING_ARRAY, method);
      }
      prototype.setName(newMethodName);

      JavaParameterInfo[] parameters = myChangeInfo.getNewParameters();

      for (JavaParameterInfo info : parameters) {
        GrParameter param;
        if (info instanceof GrParameterInfo) {
          param = factory.createParameter(info.getName(), info.getTypeText(), ((GrParameterInfo)info).getDefaultInitializer(), (GroovyPsiElement)method);
        }
        else {
          param = factory.createParameter(info.getName(), info.getTypeText(), (GroovyPsiElement)method);
        }
        prototype.getParameterList().add(param);
      }

      ConflictsUtil.checkMethodConflicts(method.getContainingClass(), method, prototype, conflicts);
      GrMethodConflictUtil.checkMethodConflicts(method.getContainingClass(), prototype, ((GrMethod)method), conflicts, true);
    }
    catch (IncorrectOperationException e) {
      LOG.error(e);
    }
  }
private void addMethodConflicts(MultiMap<PsiElement, String> conflicts)