public final class DexFormat
extends java.lang.Object
.dex
files, and helper methods for same.| Modifier and Type | Field and Description |
|---|---|
static int |
API_CONST_METHOD_HANDLE
API level to target in order to generate const-method-handle and const-method-type
|
static int |
API_CURRENT
API level to target in order to produce the most modern file
format
|
static int |
API_DEFINE_INTERFACE_METHODS
API level to target in order to define default and static interface methods
|
static int |
API_INVOKE_INTERFACE_METHODS
API level to target in order to invoke default and static interface methods
|
static int |
API_INVOKE_STATIC_INTERFACE_METHODS
API level at which the invocation of static interface methods is permitted by dx.
|
static int |
API_METHOD_HANDLES
API level to target in order to generate invoke-polymorphic and invoke-custom
|
static int |
API_NO_EXTENDED_OPCODES
API level to target in order to suppress extended opcode usage
|
static int |
API_SPACES_IN_SIMPLE_NAME
API level to target in order to allow spaces in SimpleName
|
static java.lang.String |
DEX_IN_JAR_NAME
file name of the primary
.dex file inside an
application or library .jar file |
static int |
ENDIAN_TAG
value used to indicate endianness of file contents
|
static java.lang.String |
MAGIC_PREFIX
common prefix for all dex file "magic numbers"
|
static java.lang.String |
MAGIC_SUFFIX
common suffix for all dex file "magic numbers"
|
static int |
MAX_MEMBER_IDX
Maximum addressable field or method index.
|
static int |
MAX_TYPE_IDX
Maximum addressable type index.
|
static java.lang.String |
VERSION_CURRENT
Dex file version number for dalvik.
|
static java.lang.String |
VERSION_FOR_API_10000
dex file version number for API level 10000 and earlier
|
static java.lang.String |
VERSION_FOR_API_13
dex file version number for API level 13 and earlier
|
static java.lang.String |
VERSION_FOR_API_24
dex file version number for API level 24 and earlier
|
static java.lang.String |
VERSION_FOR_API_26
dex file version number for API level 26 and earlier
|
static java.lang.String |
VERSION_FOR_API_28
dex file version number for API level 28 and earlier
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
apiToMagic(int targetApiLevel)
Returns the magic number corresponding to the given target API level.
|
static boolean |
isSupportedDexMagic(byte[] magic)
Checks whether a DEX file magic string is supported.
|
static int |
magicToApi(byte[] magic)
Returns the API level corresponding to the given magic number,
or
-1 if the given array is not a well-formed dex file
magic number. |
public static final int API_SPACES_IN_SIMPLE_NAME
public static final int API_CONST_METHOD_HANDLE
public static final int API_METHOD_HANDLES
public static final int API_DEFINE_INTERFACE_METHODS
public static final int API_INVOKE_INTERFACE_METHODS
public static final int API_INVOKE_STATIC_INTERFACE_METHODS
public static final int API_NO_EXTENDED_OPCODES
public static final int API_CURRENT
public static final java.lang.String VERSION_FOR_API_10000
public static final java.lang.String VERSION_FOR_API_28
public static final java.lang.String VERSION_FOR_API_26
public static final java.lang.String VERSION_FOR_API_24
public static final java.lang.String VERSION_FOR_API_13
public static final java.lang.String VERSION_CURRENT
Note: Dex version 36 was loadable in some versions of Dalvik but was never fully supported or completed and is not considered a valid dex file format.
public static final java.lang.String DEX_IN_JAR_NAME
.dex file inside an
application or library .jar filepublic static final java.lang.String MAGIC_PREFIX
public static final java.lang.String MAGIC_SUFFIX
public static final int ENDIAN_TAG
public static final int MAX_MEMBER_IDX
public static final int MAX_TYPE_IDX
public static int magicToApi(byte[] magic)
-1 if the given array is not a well-formed dex file
magic number.magic - array of bytes containing DEX file magic stringpublic static java.lang.String apiToMagic(int targetApiLevel)
targetApiLevel - level of API (minimum supported value 13).public static boolean isSupportedDexMagic(byte[] magic)
magic - string from DEX fileCopyright © 2020. All Rights Reserved.