public interface IncrementalFileMergerInput extends OpenableCloseable
IncrementalFileMerger.merge(java.util.List, IncrementalFileMergerOutput,
IncrementalFileMergerState).
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.
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableSet<java.lang.String> |
getAllPaths()
Obtains all OS-independent paths of all files that in this input, regardless of being changed
or not.
|
com.android.ide.common.res2.FileStatus |
getFileStatus(java.lang.String path)
Obtains the status of a path in this input.
|
java.lang.String |
getName()
Obtains the name of this input.
|
com.google.common.collect.ImmutableSet<java.lang.String> |
getUpdatedPaths()
Obtains all OS-independent paths of all files that were changed in this input.
|
java.io.InputStream |
openPath(java.lang.String path)
Opens a path for reading.
|
close, open@NonNull com.google.common.collect.ImmutableSet<java.lang.String> getUpdatedPaths()
@NonNull com.google.common.collect.ImmutableSet<java.lang.String> getAllPaths()
@NonNull java.lang.String getName()
@Nullable
com.android.ide.common.res2.FileStatus getFileStatus(@NonNull
java.lang.String path)
path - the OS-independent path; the path may or not exist in the inputnull if the path does not exist in the input or
if the path has not been changed;
null is returned if and only if !getUpdatedPaths().contains(path)@NonNull
java.io.InputStream openPath(@NonNull
java.lang.String path)
path - the pathOpenableCloseable.close() is
called