Package com.android.builder.merge
Class DelegateIncrementalFileMergerInput
java.lang.Object
com.android.builder.merge.DelegateIncrementalFileMergerInput
- All Implemented Interfaces:
IncrementalFileMergerInput,OpenableCloseable,Closeable,AutoCloseable
- Direct Known Subclasses:
FilterIncrementalFileMergerInput,RenameIncrementalFileMergerInput
public class DelegateIncrementalFileMergerInput
extends Object
implements IncrementalFileMergerInput
IncrementalFileMergerInput that delegates all operations to another
IncrementalFileMergerInput. This can be used as a base class for extending inputs.
This class will delegate all methods to the delegate input.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new input. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()com.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.voidopen()Opens the object.Opens a path for reading.
-
Constructor Details
-
DelegateIncrementalFileMergerInput
Creates a new input.- Parameters:
delegate- the delegate calls to
-
-
Method Details
-
open
public void open()Description copied from interface:OpenableCloseableOpens the object.- Specified by:
openin interfaceOpenableCloseable
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getUpdatedPaths
Description copied from interface:IncrementalFileMergerInputObtains all OS-independent paths of all files that were changed in this input.- Specified by:
getUpdatedPathsin interfaceIncrementalFileMergerInput- Returns:
- the paths, may be empty if no paths were changed
-
getAllPaths
Description copied from interface:IncrementalFileMergerInputObtains all OS-independent paths of all files that in this input, regardless of being changed or not.- Specified by:
getAllPathsin interfaceIncrementalFileMergerInput- Returns:
- the paths, may be empty if the relative tree of this input is empty
-
getName
Description copied from interface:IncrementalFileMergerInputObtains the name of this input.- Specified by:
getNamein interfaceIncrementalFileMergerInput- Returns:
- the name
-
getFileStatus
Description copied from interface:IncrementalFileMergerInputObtains the status of a path in this input.- Specified by:
getFileStatusin interfaceIncrementalFileMergerInput- 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
Description copied from interface:IncrementalFileMergerInputOpens a path for reading. This method should only be called when the input is open.- Specified by:
openPathin interfaceIncrementalFileMergerInput- Parameters:
path- the path- Returns:
- the input stream that should be closed by the caller before
Closeable.close()is called
-