private static @Nullable PsiElement findTargetRecursively(@NotNull PsiClass psiClass,
                                                                @NotNull PsiMethod method,
                                                                @Nullable PsiDocTag docTag,
                                                                @Nullable String explicitSuper,
                                                                boolean checkClass,
                                                                @NotNull HashSet<PsiClass> visitedSet) {
        if ("java.lang.Object".equals(psiClass.getQualifiedName())) return null;
        if (visitedSet.contains(psiClass)) return null;

        visitedSet.add(psiClass);

        // Check class
        PsiElement target = null;
        if (checkClass) target = findTarget(psiClass, method, docTag, explicitSuper);
        if (target != null) return target;

        // Check super class
        final PsiClass superClass = psiClass.getSuperClass();
        if (superClass != null) {
          target = findTargetRecursively(superClass, method, docTag, explicitSuper, true, visitedSet);
          if (target != null) return target;
        }

        // Check interfaces
        var targetInInterface = Stream.concat(Stream.of(psiClass.getImplementsListTypes()), Stream.of(psiClass.getExtendsListTypes()))
          .map(type -> type.resolve())
          .map(resolvedType -> findTarget(resolvedType, method, docTag, explicitSuper))
          .filter(Objects::nonNull)
          .findFirst();

        return targetInInterface.orElse(null);
      }
private static @Nullable PsiElement findTargetRecursively(@NotNull PsiClass psiClass,
                                                                @NotNull PsiMethod method,
                                                                @Nullable PsiDocTag docTag,
                                                                @Nullable String explicitSuper,
                                                                boolean checkClass,
                                                                @NotNull HashSet<PsiClass> visitedSet)