code: public Stream<TypeDeclSnippet> types() {
          return snippets()
                  .filter(sn -> status(sn).isActive() && sn.kind() == Snippet.Kind.TYPE_DECL)
                  .map(sn -> (TypeDeclSnippet) sn);
      }
docs: Returns the active type declaration (class, interface, annotation type, and enum) snippets.
  This convenience method is equivalent to {@code snippets()} filtered for
  {@link jdk.jshell.Snippet.Status#isActive() status(snippet).isActive()}
  {@code && snippet.kind() == Kind.TYPE_DECL}
  and cast to TypeDeclSnippet.
  @return the active declared type declarations.