Package proguard.io

Class 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 this DataEntryReader, as there might be active workers left that need an orderly shutdown.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Dex2Pro dex2pro  
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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 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 interface DataEntryReader
        Throws:
        java.io.IOException
      • shutdown

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