private static Class<?> @NotNull [] getAllSupers(@NotNull Class<?> clazz) {
      Collection<Class<?>> supers = new HashSet<>();
      supers.add(clazz);
      addInterfaces(clazz, supers);

      Class<?> superClass = clazz.getSuperclass();
      while (superClass != null) {
        if (superClass != Object.class) {
          supers.add(superClass);
          addInterfaces(superClass, supers);
        }
        superClass = superClass.getSuperclass();
      }

      supers.removeIf(aSuper -> aSuper == UserDataHolder.class
                                || aSuper == UserDataHolderBase.class
                                || aSuper == UserDataHolderEx.class
                                || aSuper == CompositePsiElement.class
                                || aSuper == StubBasedPsiElementBase.class
                                || aSuper == ASTNode.class
                                || aSuper == ReparseableASTNode.class
                                || aSuper == ElementBase.class
                                || aSuper == Cloneable.class
                                || aSuper == Iconable.class
                                || aSuper == Serializable.class
                                || aSuper == PomTarget.class
                                || aSuper == Queryable.class
                                || aSuper == Navigatable.class
                                || aSuper == AtomicReference.class
                                || aSuper == NavigationItem.class
                                || aSuper == NavigatablePsiElement.class
                                || aSuper == PsiElementBase.class
                                || aSuper == TreeElement.class
                                || aSuper == LeafElement.class
                                || aSuper == ASTDelegatePsiElement.class);
      return supers.toArray(ArrayUtil.EMPTY_CLASS_ARRAY);
    }
private static Class<?> @NotNull [] getAllSupers(@NotNull Class<?> clazz)