private static boolean processQualifierResult(@NotNull JavaResolveResult qualifierResult,
                                                @NotNull MethodsProcessor processor,
                                                @NotNull PsiMethodCallExpression methodCall) throws MethodProcessorSetupFailedException {
    PsiElement resolve = qualifierResult.getElement();

    if (resolve == null) {
      throw new MethodProcessorSetupFailedException("Cant determine qualifier class!");
    }

    if (resolve instanceof PsiTypeParameter) {
      processor.setAccessClass((PsiClass)resolve);
    }
    else if (resolve instanceof PsiClass) {
      PsiExpression qualifier = methodCall.getMethodExpression().getQualifierExpression();
      if (!(qualifier instanceof PsiSuperExpression)) {
        processor.setAccessClass((PsiClass)PsiUtil.getAccessObjectClass(qualifier).getElement());
      }
      else if (((PsiSuperExpression)qualifier).getQualifier() != null && PsiUtil.isLanguageLevel8OrHigher(qualifier) &&
               CommonClassNames.JAVA_LANG_CLONEABLE.equals(((PsiClass)resolve).getQualifiedName()) && ((PsiClass)resolve).isInterface()) {
        processor.setAccessClass((PsiClass)resolve);
      }
    }

    processor.setIsConstructor(false);
    processor.setName(methodCall.getMethodExpression().getReferenceName());
    ResolveState state = ResolveState.initial().put(PsiSubstitutor.KEY, qualifierResult.getSubstitutor());
    return resolve.processDeclarations(processor, state, methodCall, methodCall);
  }
private static boolean processQualifierResult(@NotNull JavaResolveResult qualifierResult,
                                                @NotNull MethodsProcessor processor,
                                                @NotNull PsiMethodCallExpression methodCall)