docs: public <T> List<T> getItems(Class<T> type) {
          List<T> r = new ArrayList<>();
          for (TopLevelItem i : getItems())
              if (type.isInstance(i))
                   r.add(type.cast(i));
          return r;
      }