Package proguard.io
Class DexClassReader
- java.lang.Object
-
- proguard.io.DexClassReader
-
- All Implemented Interfaces:
DataEntryReader
public class DexClassReader extends java.lang.Object implements DataEntryReader
This data entry reader reads dex files, converts their classes, and passes them to a given class visitor.
-
-
Constructor Summary
Constructors Constructor Description DexClassReader(boolean readCode, boolean usePrimitiveArrayConstants, ClassVisitor classVisitor)
Creates a new DexClassReader.DexClassReader(boolean readCode, ClassVisitor classVisitor)
Creates a new DexClassReader.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
This main method illustrates and tests the class.void
read(DataEntry dataEntry)
Reads the given data entry.
-
-
-
Constructor Detail
-
DexClassReader
public DexClassReader(boolean readCode, ClassVisitor classVisitor)
Creates a new DexClassReader.Does not generate
PrimitiveArrayConstant
s 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
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
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
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:
java.lang.Exception
-
-