Interface IDexValue
public interface IDexValue
An
encoded_value
Dex item.
Reference. Value objects are used to encode several types of dex data and metadata, such as static field initializer values or annotation values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Added in Android O (= Android 8.0, API 26)static final int
Added in Android O (= Android 8.0, API 26)static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionGet the intrinsic value of this item.getArray()
Get the intrinsic value of this item.boolean
Get the intrinsic value of this item.byte
getByte()
Get the intrinsic value of this item.char
getChar()
Get the intrinsic value of this item.double
Get the intrinsic value of this item.int
Get the intrinsic value of this item.int
Get the intrinsic value of this item.float
getFloat()
Get the intrinsic value of this item.int
getInt()
Get the intrinsic value of this item.long
getLong()
Get the intrinsic value of this item.int
Get the intrinsic value of this item: an index into the method handle pool.int
Get the intrinsic value of this item.int
Get the intrinsic value of this item: an index into the prototype pool.short
getShort()
Get the intrinsic value of this item.int
Get the intrinsic value of this item.int
getType()
Get the value type.int
Get the intrinsic value of this item.boolean
isNull()
Determine whether the value is null.
-
Field Details
-
VALUE_BYTE
static final int VALUE_BYTE- See Also:
-
VALUE_SHORT
static final int VALUE_SHORT- See Also:
-
VALUE_CHAR
static final int VALUE_CHAR- See Also:
-
VALUE_INT
static final int VALUE_INT- See Also:
-
VALUE_LONG
static final int VALUE_LONG- See Also:
-
VALUE_FLOAT
static final int VALUE_FLOAT- See Also:
-
VALUE_DOUBLE
static final int VALUE_DOUBLE- See Also:
-
VALUE_METHOD_TYPE
static final int VALUE_METHOD_TYPEAdded in Android O (= Android 8.0, API 26)- See Also:
-
VALUE_METHOD_HANDLE
static final int VALUE_METHOD_HANDLEAdded in Android O (= Android 8.0, API 26)- See Also:
-
VALUE_STRING
static final int VALUE_STRING- See Also:
-
VALUE_TYPE
static final int VALUE_TYPE- See Also:
-
VALUE_FIELD
static final int VALUE_FIELD- See Also:
-
VALUE_METHOD
static final int VALUE_METHOD- See Also:
-
VALUE_ENUM
static final int VALUE_ENUM- See Also:
-
VALUE_ARRAY
static final int VALUE_ARRAY- See Also:
-
VALUE_ANNOTATION
static final int VALUE_ANNOTATION- See Also:
-
VALUE_NULL
static final int VALUE_NULL- See Also:
-
VALUE_BOOLEAN
static final int VALUE_BOOLEAN- See Also:
-
-
Method Details
-
getType
int getType()Get the value type.Note: this is not a Dex type index. Refer to the
VALUE_xxx
constants in this class.- Returns:
- the value type, refer to the
VALUE_xxx
constants.
-
isNull
boolean isNull()Determine whether the value is null.- Returns:
- true if the value represents null
-
getByte
byte getByte()Get the intrinsic value of this item. The value must be a byte, else the method will throw an exception.- Returns:
- the byte value
-
getShort
short getShort()Get the intrinsic value of this item. The value must be a short, else the method will throw an exception.- Returns:
- the short value
-
getChar
char getChar()Get the intrinsic value of this item. The value must be a character, else the method will throw an exception.- Returns:
- the character value
-
getInt
int getInt()Get the intrinsic value of this item. The value must be a integer, else the method will throw an exception.- Returns:
- the integer value
-
getLong
long getLong()Get the intrinsic value of this item. The value must be a long, else the method will throw an exception.- Returns:
- the long value
-
getFloat
float getFloat()Get the intrinsic value of this item. The value must be a float, else the method will throw an exception.- Returns:
- the float value
-
getDouble
double getDouble()Get the intrinsic value of this item. The value must be a double, else the method will throw an exception.- Returns:
- the double value
-
getMethodTypeIndex
int getMethodTypeIndex()Get the intrinsic value of this item: an index into the prototype pool. The value must be a double, else the method will throw an exception.- Returns:
-
getMethodHandleIndex
int getMethodHandleIndex()Get the intrinsic value of this item: an index into the method handle pool. The value must be a double, else the method will throw an exception.- Returns:
-
getStringIndex
int getStringIndex()Get the intrinsic value of this item. The value must be a string index, else the method will throw an exception.- Returns:
- the string index value
-
getTypeIndex
int getTypeIndex()Get the intrinsic value of this item. The value must be a type index, else the method will throw an exception.- Returns:
- the type index value
-
getFieldIndex
int getFieldIndex()Get the intrinsic value of this item. The value must be a field index, else the method will throw an exception.- Returns:
- the field index value
-
getMethodIndex
int getMethodIndex()Get the intrinsic value of this item. The value must be a method index, else the method will throw an exception.
- Returns:
- the method index value
-
getEnumIndex
int getEnumIndex()Get the intrinsic value of this item. The value must be an field index representing the value of an enumerated type constant, else the method will throw an exception.- Returns:
- the index value
-
getArray
Get the intrinsic value of this item. The value must be an array of values, else the method will throw an exception.- Returns:
- the array of values
-
getAnnotation
IDexAnnotation getAnnotation()Get the intrinsic value of this item. The value must be an annotation, else the method will throw an exception.- Returns:
- the annotation value
-
getBoolean
boolean getBoolean()Get the intrinsic value of this item. The value must be a boolean, else the method will throw an exception.- Returns:
- the boolean value
-