.dex (Dalvik EXecutable)
file, which itself consists of a set of Dalvik classes.
| Modifier and Type | Field and Description |
|---|---|
| private final MixedItemSection | byteData
|
| private final MixedItemSection | classData
|
| private final ClassDefsSection | classDefs
|
| private DexOptions | dexOptions
options controlling the creation of the file |
| private int | dumpWidth
|
| private final FieldIdsSection | fieldIds
|
| private int | fileSize
|
| private final HeaderSection | header
|
| private final MixedItemSection | map
|
| private final MethodIdsSection | methodIds
|
| private final ProtoIdsSection | protoIds
|
| private final Section[] | sections
|
| private final MixedItemSection | stringData
|
| private final StringIdsSection | stringIds
|
| private final TypeIdsSection | typeIds
|
| private final MixedItemSection | typeLists
|
| private final MixedItemSection | wordData
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private static void | calcChecksum(byte[]
non-null; the bytes of the fileCalculates the checksum for the |
| private static void | calcSignature(byte[]
non-null; the bytes of the fileCalculates the signature for the |
| pack-priv IndexedItem | Returns: null-ok; its corresponding item, if it has a corresponding
item, or null if it's not that sort of constantnon-null; the constant to look upGets the |
| pack-priv MixedItemSection | |
| pack-priv MixedItemSection | |
| pack-priv ClassDefsSection | |
| public ClassDefItem | Returns: null-ok; the class with the given name, or null
if there is no such classnon-null; the class name to look forGets the class definition with the given name, if any. |
| public DexOptions | |
| pack-priv FieldIdsSection | |
| pack-priv int | |
| pack-priv Section | Returns: non-null; the sectionGets the first section of the file that is to be considered part of the data section. |
| pack-priv Section | Returns: non-null; the sectionGets the last section of the file that is to be considered part of the data section. |
| pack-priv MixedItemSection | |
| pack-priv MethodIdsSection | |
| pack-priv ProtoIdsSection | Returns: non-null; the prototype identifiers sectionGets the prototype identifiers section. |
| public Statistics | Returns: non-null; the statisticsGenerates and returns statistics for all the items in the file. |
| pack-priv MixedItemSection | |
| pack-priv StringIdsSection | |
| pack-priv TypeIdsSection | |
| pack-priv MixedItemSection | |
| pack-priv MixedItemSection | |
| pack-priv void | internIfAppropriate(Constant
non-null; constant to possibly internInterns the given constant in the appropriate section of this instance, or do nothing if the given constant isn't the sort that should be interned. |
| public boolean | |
| public void | setDumpWidth(int
>= 40; the widthSets the maximum width of the human-oriented dump of the instance. |
| public byte[] | |
| private ByteArrayAnnotatedOutput | Returns: non-null; a .dex file for this instancewhether or not to keep annotations annotate, boolean if annotating, whether to be verbose verbose)Returns the contents of this instance as a |
| public void | writeTo(OutputStream
null-ok; where to write tonull-ok; where to write human-oriented output towhether to be verbose when writing human-oriented output verbose)Writes the contents of this instance as either a binary or a human-readable form, or both. |
| byteData | back to summary |
|---|---|
| private final MixedItemSection byteData
| |
| classData | back to summary |
|---|---|
| private final MixedItemSection classData
| |
| classDefs | back to summary |
|---|---|
| private final ClassDefsSection classDefs
| |
| dexOptions | back to summary |
|---|---|
| private DexOptions dexOptions options controlling the creation of the file | |
| dumpWidth | back to summary |
|---|---|
| private int dumpWidth
| |
| fieldIds | back to summary |
|---|---|
| private final FieldIdsSection fieldIds
| |
| fileSize | back to summary |
|---|---|
| private int fileSize
| |
| header | back to summary |
|---|---|
| private final HeaderSection header
| |
| map | back to summary |
|---|---|
| private final MixedItemSection map
| |
| methodIds | back to summary |
|---|---|
| private final MethodIdsSection methodIds
| |
| protoIds | back to summary |
|---|---|
| private final ProtoIdsSection protoIds
| |
| sections | back to summary |
|---|---|
| private final Section[] sections
| |
| stringData | back to summary |
|---|---|
| private final MixedItemSection stringData
| |
| stringIds | back to summary |
|---|---|
| private final StringIdsSection stringIds
| |
| typeIds | back to summary |
|---|---|
| private final TypeIdsSection typeIds
| |
| typeLists | back to summary |
|---|---|
| private final MixedItemSection typeLists
| |
| wordData | back to summary |
|---|---|
| private final MixedItemSection wordData
| |
| DexFile | back to summary |
|---|---|
| public DexFile(DexOptions dexOptions) Constructs an instance. It is initially empty. | |
| add | back to summary |
|---|---|
| public void add(ClassDefItem clazz) Adds a class to this instance. It is illegal to attempt to add more than one class with the same name.
| |
| calcChecksum | back to summary |
|---|---|
| private static void calcChecksum(byte[] bytes) Calculates the checksum for the
| |
| calcSignature | back to summary |
|---|---|
| private static void calcSignature(byte[] bytes) Calculates the signature for the
| |
| findItemOrNull | back to summary |
|---|---|
| pack-priv IndexedItem findItemOrNull(Constant cst) Gets the
| |
| getByteData | back to summary |
|---|---|
| pack-priv MixedItemSection getByteData() Gets the byte data section. This is package-scope in order to allow
the various
| |
| getClassData | back to summary |
|---|---|
| pack-priv MixedItemSection getClassData() Gets the class data section. This is package-scope in order to allow
the various
| |
| getClassDefs | back to summary |
|---|---|
| pack-priv ClassDefsSection getClassDefs() Gets the class definitions section. This is package-scope in order to allow
the various
| |
| getClassOrNull | back to summary |
|---|---|
| public ClassDefItem getClassOrNull(String name) Gets the class definition with the given name, if any.
| |
| getDexOptions | back to summary |
|---|---|
| public DexOptions getDexOptions() Gets the dex-creation options object. | |
| getFieldIds | back to summary |
|---|---|
| pack-priv FieldIdsSection getFieldIds() Gets the field identifiers section. This is package-scope in order to allow
the various
| |
| getFileSize | back to summary |
|---|---|
| pack-priv int getFileSize() Gets the total file size, if known. This is package-scope in order to allow
the
| |
| getFirstDataSection | back to summary |
|---|---|
| pack-priv Section getFirstDataSection() Gets the first section of the file that is to be considered part of the data section. This is package-scope in order to allow the header section to query it.
| |
| getLastDataSection | back to summary |
|---|---|
| pack-priv Section getLastDataSection() Gets the last section of the file that is to be considered part of the data section. This is package-scope in order to allow the header section to query it.
| |
| getMap | back to summary |
|---|---|
| pack-priv MixedItemSection getMap() Gets the map section. This is package-scope in order to allow the header section to query it.
| |
| getMethodIds | back to summary |
|---|---|
| pack-priv MethodIdsSection getMethodIds() Gets the method identifiers section. This is package-scope in order to allow
the various
| |
| getProtoIds | back to summary |
|---|---|
| pack-priv ProtoIdsSection getProtoIds() Gets the prototype identifiers section. This is package-scope in order to allow
the various
| |
| getStatistics | back to summary |
|---|---|
| public Statistics getStatistics() Generates and returns statistics for all the items in the file.
| |
| getStringData | back to summary |
|---|---|
| pack-priv MixedItemSection getStringData() Gets the string data section. This is package-scope in order to allow
the various
| |
| getStringIds | back to summary |
|---|---|
| pack-priv StringIdsSection getStringIds() Gets the string identifiers section. This is package-scope in order to allow
the various
| |
| getTypeIds | back to summary |
|---|---|
| pack-priv TypeIdsSection getTypeIds() Gets the type identifiers section. This is package-scope in order to allow
the various
| |
| getTypeLists | back to summary |
|---|---|
| pack-priv MixedItemSection getTypeLists() Gets the type lists section. This is package-scope in order to allow
the various
| |
| getWordData | back to summary |
|---|---|
| pack-priv MixedItemSection getWordData() Gets the word data section. This is package-scope in order to allow
the various
| |
| internIfAppropriate | back to summary |
|---|---|
| pack-priv void internIfAppropriate(Constant cst) Interns the given constant in the appropriate section of this instance, or do nothing if the given constant isn't the sort that should be interned.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if this dex doesn't contain any class defs. | |
| setDumpWidth | back to summary |
|---|---|
| public void setDumpWidth(int dumpWidth) Sets the maximum width of the human-oriented dump of the instance.
| |
| toDex | back to summary |
|---|---|
| public byte[] toDex(Writer humanOut, boolean verbose) throws IOException Returns the contents of this instance as a
| |
| toDex0 | back to summary |
|---|---|
| private ByteArrayAnnotatedOutput toDex0(boolean annotate, boolean verbose) Returns the contents of this instance as a
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(OutputStream out, Writer humanOut, boolean verbose) throws IOException Writes the contents of this instance as either a binary or a human-readable form, or both.
| |