@Nullable
  private static Pair<PsiClass, PsiElement> getSuperIfOnlyOne(@NotNull final PsiClass aClass) {
    PsiClass superClass = aClass.getSuperClass();
    if (superClass != null && !CommonClassNames.JAVA_LANG_OBJECT.equals(superClass.getQualifiedName())) {
      return isInSourceContent(aClass) ? Pair.create(superClass, aClass.getExtendsList()) : null;
    }

    PsiClass anInterface = Arrays.stream(aClass.getInterfaces())
      .filter(c -> !CommonClassNames.JAVA_LANG_OBJECT.equals(c.getQualifiedName()))
      .filter(c -> isInSourceContent(c))
      .collect(MoreCollectors.onlyOne())
      .orElse(null);
    if (anInterface == null) {
      return null;
    }
    else {
      return Pair.create(anInterface, aClass.isInterface() ? aClass.getExtendsList() : aClass.getImplementsList());
    }
  }
@Nullable
  private static Pair<PsiClass, PsiElement> getSuperIfOnlyOne(@NotNull final PsiClass aClass)