Class RenameIncrementalFileMergerInput

java.lang.Object
com.android.builder.merge.DelegateIncrementalFileMergerInput
com.android.builder.merge.RenameIncrementalFileMergerInput
All Implemented Interfaces:
IncrementalFileMergerInput, OpenableCloseable, Closeable, AutoCloseable

public class RenameIncrementalFileMergerInput extends DelegateIncrementalFileMergerInput
IncrementalFileMergerInput that renames files in another input according to a renaming function. This means that the actual paths of the files reported have been transformed.

For example, a rename input that prepends a/ to the files created over an input that has file b, will report having file a/b. Opening file a/b will effectively open file b.

The rename input will effectively create a view over another input in which files have been renamed according to an injective function. Because name transformation needs to occur in both directions, for example, it is necessary to transform b into a/b and a/b back into b, the rename input needs to receive two functions: the transformation function and its inverse.

Both rename and inverse rename functions are assumed to be stable, that is, the transformations should always yield the same output for the same input.