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 void
read(DataEntry dataEntry)
Reads the given data entry.void
shutdown(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
PrimitiveArrayConstant
s 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 whetherPrimitiveArrayConstant
can 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:DataEntryReader
Reads the given data entry.- Specified by:
read
in 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.
-
-