public static boolean isInnerClass(@NotNull VirtualFile file, @Nullable ClassReader reader) {
    String name = file.getNameWithoutExtension();
    int p = name.lastIndexOf('$', name.length() - 2);
    if (p <= 0) return false;

    Boolean isInner = IS_INNER_CLASS.get(file);
    if (isInner != null) return isInner;

    if (reader == null) {
      try {
        reader = new ClassReader(file.contentsToByteArray(false));
      }
      catch (IOException e) {
        throw new RuntimeException(e);
      }
    }

    final String className = reader.getClassName();
    class MyVisitor extends ClassVisitor {
      boolean isInner;
      
      MyVisitor() {
        super(Opcodes.API_VERSION);
      }

      @Override
      public void visitOuterClass(String owner, String name, String desc) {
        isInner = true;
      }

      @Override
      public void visitInnerClass(String name, String outer, String inner, int access) {
        if (className.equals(name)) {
          isInner = true;
        }
      }
    }
    MyVisitor visitor = new MyVisitor();
    reader.accept(visitor, EMPTY_ATTRIBUTES, ClassReader.SKIP_DEBUG | ClassReader.SKIP_CODE | ClassReader.SKIP_FRAMES);

    IS_INNER_CLASS.set(file, visitor.isInner);
    return visitor.isInner;
  }
public static boolean isInnerClass(@NotNull VirtualFile file, @Nullable ClassReader reader)