Package org.jf.dexlib2.dexbacked
Class DexBackedDexFile
java.lang.Object
org.jf.dexlib2.dexbacked.DexBackedDexFile
- All Implemented Interfaces:
DexFile
- Direct Known Subclasses:
CDexBackedDexFile,DexBackedOdexFile,OatFile.OatDexFile
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final DexBufferprivate final DexBufferprivate final intprivate final intprivate final intprivate final intprivate final intprivate final intprivate final Opcodesprivate final intprivate final intprivate final intprivate final intprivate final intprivate final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionDexBackedDexFile(Opcodes opcodes, byte[] buf) DexBackedDexFile(Opcodes opcodes, byte[] buf, int offset) protectedDexBackedDexFile(Opcodes opcodes, byte[] buf, int offset, boolean verifyMagic) DexBackedDexFile(Opcodes opcodes, DexBuffer buf) protectedDexBackedDexFile(Opcodes opcodes, DexBuffer dexBuffer, DexBuffer dataBuffer, int offset, boolean verifyMagic) -
Method Summary
Modifier and TypeMethodDescriptionprotected DexBackedMethodImplementationcreateMethodImplementation(DexBackedDexFile dexFile, DexBackedMethod method, int codeOffset) static DexBackedDexFilefromInputStream(Opcodes opcodes, InputStream is) intSet<? extends DexBackedClassDef> Get a set of the classes defined in this dex file.protected OpcodesgetDefaultOpcodes(int version) getMapItemForSection(int itemType) Get the Opcodes associated with this dex filegetReferences(int referenceType) protected intgetVersion(byte[] buf, int offset, boolean verifyMagic) private intreadHiddenApiRestrictionsOffset(int classIndex) boolean
-
Field Details
-
dexBuffer
-
dataBuffer
-
opcodes
-
stringCount
private final int stringCount -
stringStartOffset
private final int stringStartOffset -
typeCount
private final int typeCount -
typeStartOffset
private final int typeStartOffset -
protoCount
private final int protoCount -
protoStartOffset
private final int protoStartOffset -
fieldCount
private final int fieldCount -
fieldStartOffset
private final int fieldStartOffset -
methodCount
private final int methodCount -
methodStartOffset
private final int methodStartOffset -
classCount
private final int classCount -
classStartOffset
private final int classStartOffset -
mapOffset
private final int mapOffset -
stringSection
-
typeSection
-
fieldSection
-
methodSection
-
protoSection
-
classSection
-
callSiteSection
-
methodHandleSection
-
-
Constructor Details
-
DexBackedDexFile
protected DexBackedDexFile(@Nullable Opcodes opcodes, @Nonnull byte[] buf, int offset, boolean verifyMagic) -
DexBackedDexFile
-
DexBackedDexFile
-
DexBackedDexFile
-
DexBackedDexFile
-
-
Method Details
-
getBaseDataOffset
public int getBaseDataOffset()- Returns:
- The offset that various data offsets are relative to. This is always 0 for a dex file, but may be different for other related formats (e.g. cdex).
-
getVersion
protected int getVersion(byte[] buf, int offset, boolean verifyMagic) -
getDefaultOpcodes
-
getBuffer
-
getDataBuffer
-
fromInputStream
@Nonnull public static DexBackedDexFile fromInputStream(@Nullable Opcodes opcodes, @Nonnull InputStream is) throws IOException - Throws:
IOException
-
getOpcodes
Description copied from interface:DexFileGet the Opcodes associated with this dex file- Specified by:
getOpcodesin interfaceDexFile- Returns:
- The Opcodes instance representing the possible opcodes that can be encountered in this dex file
-
supportsOptimizedOpcodes
public boolean supportsOptimizedOpcodes() -
getClasses
Description copied from interface:DexFileGet a set of the classes defined in this dex file. The classes in the returned set will all have unique types.- Specified by:
getClassesin interfaceDexFile- Returns:
- A set of the classes defined in this dex file
-
getStringReferences
-
getTypeReferences
-
getReferences
-
getMapItems
-
getMapItemForSection
-
getStringSection
-
getTypeSection
-
getFieldSection
-
getMethodSection
-
getProtoSection
-
getClassSection
-
getCallSiteSection
-
getMethodHandleSection
-
createMethodImplementation
protected DexBackedMethodImplementation createMethodImplementation(@Nonnull DexBackedDexFile dexFile, @Nonnull DexBackedMethod method, int codeOffset) -
readHiddenApiRestrictionsOffset
private int readHiddenApiRestrictionsOffset(int classIndex)
-