Package proguard.io
Class DexClassReader
java.lang.Object
proguard.io.DexClassReader
- All Implemented Interfaces:
DataEntryReader
This data entry reader reads dex files, converts their classes, and passes them to a given class
visitor.
-
Constructor Summary
ConstructorsConstructorDescriptionDexClassReader(boolean readCode, boolean usePrimitiveArrayConstants, ClassVisitor classVisitor) Creates a new DexClassReader.DexClassReader(boolean readCode, ClassVisitor classVisitor) Creates a new DexClassReader. -
Method Summary
-
Constructor Details
-
DexClassReader
Creates a new DexClassReader.Does not generate
PrimitiveArrayConstants by default, which is a custom ProGuardCORE extension.- Parameters:
readCode- specifies whether to read the actual code or just skip it.classVisitor- the class visitor to which decoded classes will be passed.
-
DexClassReader
public DexClassReader(boolean readCode, boolean usePrimitiveArrayConstants, ClassVisitor classVisitor) 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 Details
-
read
Description copied from interface:DataEntryReaderReads the given data entry.- Specified by:
readin interfaceDataEntryReader- Throws:
IOException
-
main
This main method illustrates and tests the class. It reads an input dex file (or jar file with a dex file) and prints out its classes.- Throws:
Exception
-