Package proguard.io
Class ParallelDexClassReader
- java.lang.Object
-
- proguard.io.ParallelDexClassReader
-
- All Implemented Interfaces:
DataEntryReader
public class ParallelDexClassReader extends java.lang.Object implements DataEntryReader
This data entry reader reads dex files, converts their classes, and passes them to a given class visitor. It is essential to call shutdown() after pumping to thisDataEntryReader, as there might be active workers left that need an orderly shutdown.
-
-
Constructor Summary
Constructors Constructor Description ParallelDexClassReader(boolean readCode, boolean usePrimitiveArrayConstants, ClassVisitor classVisitor, int maximumThreads)Creates a new DexClassReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidread(DataEntry dataEntry)Reads the given data entry.voidshutdown(int timeoutSeconds)Shuts down and waits for up to timeoutSeconds for any outstanding workers to finish.
-
-
-
Field Detail
-
dex2pro
public final Dex2Pro dex2pro
-
-
Constructor Detail
-
ParallelDexClassReader
public ParallelDexClassReader(boolean readCode, boolean usePrimitiveArrayConstants, ClassVisitor classVisitor, int maximumThreads)Creates a new DexClassReader.If
PrimitiveArrayConstants are generated then they should be converted back to standard Java arrays before converting to Java class files usingPrimitiveArrayConstantReplacer.- Parameters:
readCode- specifies whether to read the actual code or just skip it.usePrimitiveArrayConstants- specifies whetherPrimitiveArrayConstantcan be generated when applicable.classVisitor- the class visitor to which decoded classes will be passed.
-
-
Method Detail
-
read
public void read(DataEntry dataEntry) throws java.io.IOException
Description copied from interface:DataEntryReaderReads the given data entry.- Specified by:
readin interfaceDataEntryReader- Throws:
java.io.IOException
-
shutdown
public void shutdown(int timeoutSeconds)
Shuts down and waits for up to timeoutSeconds for any outstanding workers to finish.
-
-