Interface IncrementalFileMergerInput
- All Superinterfaces:
AutoCloseable,Closeable,OpenableCloseable
- All Known Implementing Classes:
DelegateIncrementalFileMergerInput,FilterIncrementalFileMergerInput,LazyIncrementalFileMergerInput,RenameIncrementalFileMergerInput
IncrementalFileMerger.merge(java.util.List, IncrementalFileMergerOutput, IncrementalFileMergerState, Predicate).
An input represents a relative tree and a set of changed paths. Note that deleted paths are reported in the changes, although they are no longer part of the relative tree because, well, they were deleted :)
The input contains both the updated relative files (see getUpdatedPaths()) and
the current set of relative files (see getAllPaths().
Each IncrementalFileMergerInput is identified by a name and a contains a set of
updates on RelativeFile. These are usually obtained using the methods from IncrementalRelativeFileSets.
The input is responsible for reading input files given their paths to the input. This makes the actual source of the data invisible to the user.
Because not all methods are necessarily needed for every merge operation, it is recommended to
use LazyIncrementalFileMergerInput as implementation.
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<String>Obtains all OS-independent paths of all files that in this input, regardless of being changed or not.com.android.ide.common.resources.FileStatusgetFileStatus(String path) Obtains the status of a path in this input.getName()Obtains the name of this input.com.google.common.collect.ImmutableSet<String>Obtains all OS-independent paths of all files that were changed in this input.Opens a path for reading.Methods inherited from interface com.android.builder.merge.OpenableCloseable
open
-
Method Details
-
getUpdatedPaths
Obtains all OS-independent paths of all files that were changed in this input.- Returns:
- the paths, may be empty if no paths were changed
-
getAllPaths
Obtains all OS-independent paths of all files that in this input, regardless of being changed or not.- Returns:
- the paths, may be empty if the relative tree of this input is empty
-
getName
Obtains the name of this input.- Returns:
- the name
-
getFileStatus
Obtains the status of a path in this input.- Parameters:
path- the OS-independent path; the path may or not exist in the input- Returns:
- the status of the path or
nullif the path does not exist in the input or if the path has not been changed;nullis returned if and only if!getUpdatedPaths().contains(path)
-
openPath
Opens a path for reading. This method should only be called when the input is open.- Parameters:
path- the path- Returns:
- the input stream that should be closed by the caller before
Closeable.close()is called
-