private static void addMethodsOfType(PsiType psiType, Collection<Pair<PsiMethod, PsiSubstitutor>> results) {
    if (!(psiType instanceof PsiClassType classType)) return;
    final PsiClassType.ClassResolveResult classResolveResult = classType.resolveGenerics();
    final PsiClass psiClass = classResolveResult.getElement();
    if (null != psiClass) {
      final PsiSubstitutor classResolveResultSubstitutor = classResolveResult.getSubstitutor();
      for (PsiMethod psiMethod : psiClass.getAllMethods()) {
        if (isAcceptableMethod(psiMethod)) {
          final PsiClass containingClass = psiMethod.getContainingClass();
          if (containingClass != null) {
            final PsiSubstitutor psiSubstitutor =
              TypeConversionUtil.getSuperClassSubstitutor(containingClass, psiClass, classResolveResultSubstitutor);
            if (!isAlreadyPresent(psiMethod, psiSubstitutor, results)) {
              results.add(Pair.pair(psiMethod, psiSubstitutor));
            }
          }
        }
      }
    }
  }
private static void addMethodsOfType(PsiType psiType, Collection<Pair<PsiMethod, PsiSubstitutor>> results)