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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Constant value for value-annotation.
    static final int
    Constant value for value-array.
    static final int
    Constant value for value-boolean.
    static final int
    Constant value for value-byte.
    static final int
    Constant value for value-char.
    static final int
    Constant value for value-double.
    static final int
    Constant value for value-enum.
    static final int
    Constant value for value-field.
    static final int
    Constant value for value-float.
    static final int
    Constant value for value-int.
    static final int
    Constant value for value-long.
    static final int
    Constant value for value-method.
    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
    Constant value for value-null.
    static final int
    Constant value for value-short.
    static final int
    Constant value for value-string.
    static final int
    Constant value for value-type.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the intrinsic value of this item.
    Get the intrinsic value of this item.
    boolean
    Get the intrinsic value of this item.
    byte
    Get the intrinsic value of this item.
    char
    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
    Get the intrinsic value of this item.
    int
    Get the intrinsic value of this item.
    long
    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
    Get the intrinsic value of this item.
    int
    Get the intrinsic value of this item.
    int
    Get the value type.
    int
    Get the intrinsic value of this item.
    boolean
    Determine whether the value is null.
  • Field Details

    • VALUE_BYTE

      static final int VALUE_BYTE
      Constant value for value-byte.
      See Also:
    • VALUE_SHORT

      static final int VALUE_SHORT
      Constant value for value-short.
      See Also:
    • VALUE_CHAR

      static final int VALUE_CHAR
      Constant value for value-char.
      See Also:
    • VALUE_INT

      static final int VALUE_INT
      Constant value for value-int.
      See Also:
    • VALUE_LONG

      static final int VALUE_LONG
      Constant value for value-long.
      See Also:
    • VALUE_FLOAT

      static final int VALUE_FLOAT
      Constant value for value-float.
      See Also:
    • VALUE_DOUBLE

      static final int VALUE_DOUBLE
      Constant value for value-double.
      See Also:
    • VALUE_METHOD_TYPE

      static final int VALUE_METHOD_TYPE
      Added in Android O (= Android 8.0, API 26)
      See Also:
    • VALUE_METHOD_HANDLE

      static final int VALUE_METHOD_HANDLE
      Added in Android O (= Android 8.0, API 26)
      See Also:
    • VALUE_STRING

      static final int VALUE_STRING
      Constant value for value-string.
      See Also:
    • VALUE_TYPE

      static final int VALUE_TYPE
      Constant value for value-type.
      See Also:
    • VALUE_FIELD

      static final int VALUE_FIELD
      Constant value for value-field.
      See Also:
    • VALUE_METHOD

      static final int VALUE_METHOD
      Constant value for value-method.
      See Also:
    • VALUE_ENUM

      static final int VALUE_ENUM
      Constant value for value-enum.
      See Also:
    • VALUE_ARRAY

      static final int VALUE_ARRAY
      Constant value for value-array.
      See Also:
    • VALUE_ANNOTATION

      static final int VALUE_ANNOTATION
      Constant value for value-annotation.
      See Also:
    • VALUE_NULL

      static final int VALUE_NULL
      Constant value for value-null.
      See Also:
    • VALUE_BOOLEAN

      static final int VALUE_BOOLEAN
      Constant value for 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 method type index, else the method will throw an exception.
      Returns:
      the prototype index value
    • getMethodHandleIndex

      int getMethodHandleIndex()
      Get the intrinsic value of this item: an index into the method handle pool. The value must be a method handle index, else the method will throw an exception.
      Returns:
      the method handle index value
    • 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

      List<IDexValue> 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