public class D8BasedDexDataEntryWriter extends DexDataEntryWriter
dexDataEntryWriter, dexFileName, otherDataEntryWriter
Constructor and Description |
---|
D8BasedDexDataEntryWriter(ClassPool classPool,
StringMatcher classNameFilter,
ClassPath libraryJars,
java.lang.String dexFileName,
boolean forceDex,
int minSdkVersion,
boolean debuggable,
DataEntryReader extraDexDataEntryVisitor,
DataEntryWriter dexDataEntryWriter,
DataEntryWriter otherDataEntryWriter)
Creates a new D8BasedDexDataEntryWriter.
|
Modifier and Type | Method and Description |
---|---|
protected ClassVisitor |
createClassConverter()
Creates a new class converter that collects converted classes in our Dex composer.
|
void |
println(java.io.PrintWriter pw,
java.lang.String prefix)
Prints out the structure of the data entry writer.
|
protected void |
writeDex(java.io.OutputStream outputStream)
Creates a new Dex instance from the collected classes.
|
close, createDirectory, createOutputStream, sameOutputStream
public D8BasedDexDataEntryWriter(ClassPool classPool, StringMatcher classNameFilter, ClassPath libraryJars, java.lang.String dexFileName, boolean forceDex, int minSdkVersion, boolean debuggable, DataEntryReader extraDexDataEntryVisitor, DataEntryWriter dexDataEntryWriter, DataEntryWriter otherDataEntryWriter)
classPool
- the class pool from which classes are collected.classNameFilter
- an optional filter for classes to be written.dexFileName
- the dex file name.forceDex
- specifies whether the dex files should always be written, even if they don't
contain any code.minSdkVersion
- the minimum supported API level.debuggable
- whether the dex file shall be debuggable or not.extraDexDataEntryVisitor
- an optional extra visitor for all dex data entries that
written. The visitor can use the data entry names, but must not read their contents.dexDataEntryWriter
- the writer to which the converted dex file is written.otherDataEntryWriter
- the writer to which other data entries are written.protected ClassVisitor createClassConverter()
DexDataEntryWriter
protected void writeDex(java.io.OutputStream outputStream) throws java.io.IOException
DexDataEntryWriter
writeDex
in class DexDataEntryWriter
java.io.IOException
public void println(java.io.PrintWriter pw, java.lang.String prefix)
DataEntryWriter
println
in interface DataEntryWriter
println
in class DexDataEntryWriter
pw
- the print stream to which the structure should be printed.prefix
- a prefix for every printed line.