@RequiresReadLock
      static ClassInfo create(@NotNull PsiClass psiClass) {
        boolean isLocalOrAnonymous = false;
        int requiredDepth = 0;
        String className = JVMNameUtil.getNonAnonymousClassName(psiClass);
        if (className == null) {
          isLocalOrAnonymous = true;
          Pair<PsiClass, Integer> enclosing = getTopOrStaticEnclosingClass(psiClass);
          PsiClass topLevelClass = enclosing.first;
          if (topLevelClass != null) {
            final String parentClassName = JVMNameUtil.getNonAnonymousClassName(topLevelClass);
            if (parentClassName != null) {
              requiredDepth = enclosing.second;
              className = parentClassName;
            }
          }
          else {
            final StringBuilder sb = new StringBuilder();
            PsiTreeUtil.treeWalkUp(psiClass, null, (element, element2) -> {
              sb.append('\n').append(element);
              return true;
            });
            LOG.info("Local or anonymous class " + psiClass + " has no non-local parent, parents:" + sb);
          }
        }
        return new ClassInfo(isLocalOrAnonymous, requiredDepth, className);
      }
@RequiresReadLock
      static ClassInfo create(@NotNull PsiClass psiClass)