Package proguard.io

Class ParallelDexClassReader

java.lang.Object
proguard.io.ParallelDexClassReader
All Implemented Interfaces:
DataEntryReader

public class ParallelDexClassReader extends 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 this DataEntryReader, as there might be active workers left that need an orderly shutdown.
  • Field Details

    • dex2pro

      public final Dex2Pro dex2pro
  • Constructor Details

    • 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 using PrimitiveArrayConstantReplacer.

      Parameters:
      readCode - specifies whether to read the actual code or just skip it.
      usePrimitiveArrayConstants - specifies whether PrimitiveArrayConstant can be generated when applicable.
      classVisitor - the class visitor to which decoded classes will be passed.
  • Method Details

    • read

      public void read(DataEntry dataEntry) throws IOException
      Description copied from interface: DataEntryReader
      Reads the given data entry.
      Specified by:
      read in interface DataEntryReader
      Throws:
      IOException
    • shutdown

      public void shutdown(int timeoutSeconds)
      Shuts down and waits for up to timeoutSeconds for any outstanding workers to finish.