Interface InputTree<T extends InputResource>

Type Parameters:
T - the contained type
All Superinterfaces:
Resource, Resources<T>
All Known Subinterfaces:
ClassTree, DocumentationDirectory, FileTree<T>, JavadocDirectory, JavaResourceTree
All Known Implementing Classes:
DefaultClassTree, DefaultFileTree, DefaultJavaResourceTree, ZipFileInputTree

public interface InputTree<T extends InputResource> extends Resources<T>

The representation of a tree of InputResources. Each InputResource in the tree is identified by a path relative to the root of the tree.

Implementations of this interface must provide a ResourceFactory that supports the invocation of ResourceFactory.create(ResourceType, Project, Object...) with the following arguments

Implementations of the jdbld API must at least support the creation of an InputTree from a ZipFile.

Implementations of this interface must ensure that the content of the input tree is not evaluated before a consuming operation is performed on the Stream returned by paths() or entries().

  • Method Details

    • exclude

      Add a ant-style path pattern to exclude from the tree.
      Parameters:
      pattern - the pattern
      Returns:
      the file tree
    • paths

      Returns the relative paths of the entries in this tree.
      Returns:
      the stream
    • entries

      Returns the paths of the files in this file tree relative to its root.
      Returns:
      the stream
    • of

      static InputTree<InputResource> of(InputResource backing, String... patterns)
      Creates a new input file tree from the given backing input resources.
      Parameters:
      backing - the source
      patterns - the patterns. If no patterns are given, the default pattern "**" is used
      Returns:
      the file tree