All Superinterfaces:
ICodeField, ICodeItem, IDexItem

public interface IDexField extends IDexItem, ICodeField
This interface represents a Dex field_id_item object, that is, a reference to an internal or external field used in the dex. Retrieved via IDexUnit.
  • Method Details

    • getIndex

      int getIndex()
      Get the index of this item in the Dex file's field list.
      Specified by:
      getIndex in interface ICodeItem
      Returns:
      the field index
    • getData

      IDexFieldData getData()
      Get a reference to the field definition, if the field is internal.
      Returns:
      the field data, null for external fields
    • getClassType

      IDexType getClassType()
      Description copied from interface: ICodeField
      Get the type of the class holding this field.
      Specified by:
      getClassType in interface ICodeField
      Returns:
    • getClassTypeIndex

      int getClassTypeIndex()
      Get the containing class type index.
      Returns:
      the class type index
    • getClassTypeSignature

      String getClassTypeSignature(boolean effective)
    • getFieldType

      IDexType getFieldType()
      Description copied from interface: ICodeField
      Get the field's type.
      Specified by:
      getFieldType in interface ICodeField
      Returns:
    • getFieldTypeIndex

      int getFieldTypeIndex()
      Get the field type index.
      Returns:
      the type index
    • getFieldTypeSignature

      String getFieldTypeSignature(boolean effective)
    • getNameIndex

      int getNameIndex()
      Get the field name index.
      Returns:
      the name index
    • getName

      String getName(boolean effective)
      Get the name for this field.
      Specified by:
      getName in interface ICodeItem
      Parameters:
      effective - true to get the actual name, false to return the original name (if the unit allows the modification of items)
      Returns:
      the name
    • getSignature

      String getSignature(boolean effective)
      Get the signature for this field.

      Example: Lcom/xyz/Blob;->name:Ljava/lang/String;

      Specified by:
      getSignature in interface ICodeItem
      Parameters:
      effective - true to get the actual signature, false to return the original signature (if the unit allows the modification of items)
      Returns:
      the signature
    • getSignature

      String getSignature(boolean effective, boolean internal)
      Description copied from interface: ICodeItem
      Get the item signature.
      Specified by:
      getSignature in interface ICodeItem
      Parameters:
      effective - true to get the actual signature, false to return the original signature (if the unit allows the modification of items)
      internal - true to generate internal names (default); false to generate user-friendly signatures (may be the same as the internal signatures)
      Returns:
      the signature
    • getSignature

      String getSignature(boolean effective, boolean internal, boolean includeFieldType)
    • getSignature

      String getSignature(boolean effective, boolean internal, boolean includeFieldType, boolean qualifiedNames)
    • setName

      boolean setName(String name)
      Rename this field. This method does not notify changes on success: it is up to the user to issue a J.UnitChange notification.

      This method is for convenience only: users can always use the associated unit's RENAME action (through the executeAction method) to rename an item generically.

      Parameters:
      name - the new name
      Returns:
      success indicator
    • getStaticInitializer

      IDexValue getStaticInitializer()
      Retrieve the initial value of this field if it is a static final class field.
      Returns:
      the initial field value, null if none or on error