Interface InputTree<T extends InputResource>
- Type Parameters:
T- the contained type
- All Known Subinterfaces:
ClassTree, DocumentationDirectory, FileTree<T>, JavadocDirectory, JavaResourceTree
- All Known Implementing Classes:
DefaultClassTree, DefaultFileTree, DefaultJavaResourceTree, ZipFileInputTree
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
- The backing
InputResourcefor theInputTree String[] an array of ant-style path patterns
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().
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordInputTree.Entry<T extends InputResource>An Entry in the tree. -
Method Summary
Modifier and TypeMethodDescriptionentries()Returns the paths of the files in this file tree relative to its root.Add a ant-style path pattern to exclude from the tree.static InputTree<InputResource> of(InputResource backing, String... patterns) Creates a new input file tree from the given backing input resources.paths()Returns the relative paths of the entries in this tree.Methods inherited from interface Resource
asOfLocalized, cleanup, isNewerThan, name, type
-
Method Details
-
exclude
-
paths
-
entries
Returns the paths of the files in this file tree relative to its root.- Returns:
- the stream
-
of
Creates a new input file tree from the given backing input resources.- Parameters:
backing- the sourcepatterns- the patterns. If no patterns are given, the default pattern "**" is used- Returns:
- the file tree
-