Package proguard.io
Class D8BasedDexDataEntryWriter
- java.lang.Object
-
- proguard.io.DexDataEntryWriter
-
- proguard.io.D8BasedDexDataEntryWriter
-
- All Implemented Interfaces:
java.lang.AutoCloseable,DataEntryWriter
public class D8BasedDexDataEntryWriter extends DexDataEntryWriter
An dex writer that uses the d8 tool from the Android SDK.
-
-
Field Summary
-
Fields inherited from class proguard.io.DexDataEntryWriter
dexDataEntryWriter, dexFileName, otherDataEntryWriter
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ClassVisitorcreateClassConverter()voidprintln(java.io.PrintWriter pw, java.lang.String prefix)Prints out the structure of the data entry writer.protected voidwriteDex(java.io.OutputStream outputStream)Creates a new Dex instance from the collected classes.-
Methods inherited from class proguard.io.DexDataEntryWriter
close, createDirectory, createOutputStream, sameOutputStream
-
-
-
-
Constructor Detail
-
D8BasedDexDataEntryWriter
public 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.- Parameters:
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.
-
-
Method Detail
-
createClassConverter
protected ClassVisitor createClassConverter()
-
writeDex
protected void writeDex(java.io.OutputStream outputStream) throws java.io.IOExceptionDescription copied from class:DexDataEntryWriterCreates a new Dex instance from the collected classes.- Specified by:
writeDexin classDexDataEntryWriter- Throws:
java.io.IOException
-
println
public void println(java.io.PrintWriter pw, java.lang.String prefix)Description copied from interface:DataEntryWriterPrints out the structure of the data entry writer.- Specified by:
printlnin interfaceDataEntryWriter- Overrides:
printlnin classDexDataEntryWriter- Parameters:
pw- the print stream to which the structure should be printed.prefix- a prefix for every printed line.
-
-