public class LazyIncrementalFileMergerInput extends java.lang.Object implements IncrementalFileMergerInput
IncrementalFileMergerInput that lazily loads required data.
In general, this is constructed not directly using the constructor (which absolutely can be
used), but using the factory methods in LazyIncrementalFileMergerInputs.
| Constructor and Description |
|---|
LazyIncrementalFileMergerInput(java.lang.String name,
com.android.tools.build.apkzlib.utils.CachedSupplier<com.google.common.collect.ImmutableMap<RelativeFile,com.android.ide.common.resources.FileStatus>> updates,
com.android.tools.build.apkzlib.utils.CachedSupplier<com.google.common.collect.ImmutableSet<RelativeFile>> files)
Creates a new input.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the object.
|
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.resources.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.
|
void |
open()
Opens the object.
|
java.io.InputStream |
openPath(java.lang.String path)
Opens a path for reading.
|
public LazyIncrementalFileMergerInput(@NonNull
java.lang.String name,
@NonNull
com.android.tools.build.apkzlib.utils.CachedSupplier<com.google.common.collect.ImmutableMap<RelativeFile,com.android.ide.common.resources.FileStatus>> updates,
@NonNull
com.android.tools.build.apkzlib.utils.CachedSupplier<com.google.common.collect.ImmutableSet<RelativeFile>> files)
name - the input nameupdates - the file and how they were updatedfiles - all files@NonNull public com.google.common.collect.ImmutableSet<java.lang.String> getUpdatedPaths()
IncrementalFileMergerInputgetUpdatedPaths in interface IncrementalFileMergerInput@NonNull public com.google.common.collect.ImmutableSet<java.lang.String> getAllPaths()
IncrementalFileMergerInputgetAllPaths in interface IncrementalFileMergerInput@NonNull public java.lang.String getName()
IncrementalFileMergerInputgetName in interface IncrementalFileMergerInput@Nullable
public com.android.ide.common.resources.FileStatus getFileStatus(@NonNull
java.lang.String path)
IncrementalFileMergerInputgetFileStatus in interface IncrementalFileMergerInputpath - 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
public java.io.InputStream openPath(@NonNull
java.lang.String path)
IncrementalFileMergerInputopenPath in interface IncrementalFileMergerInputpath - the pathOpenableCloseable.close() is
calledpublic void open()
OpenableCloseableopen in interface OpenableCloseablepublic void close()
OpenableCloseableclose in interface OpenableCloseable