All Superinterfaces:
ICodeItem, ICodeType, IDexItem

public interface IDexType extends IDexItem, ICodeType
This interface represents a reference to a dex type used in the dex. It may be internal or external. If the type is internal (defined in the dex), the implementation should be located in the associated IDexClass object. Types can be retrieved via IDexUnit.
See Also:
  • Method Details

    • getImplementingClass

      IDexClass getImplementingClass()
      Retrieve the implementation of this type, if it is internal.
      Specified by:
      getImplementingClass in interface ICodeType
      Returns:
      a class object, null if none
    • isClass

      boolean isClass()
      Determine if the type is a class or interface (not an array, not a primitive type)
      Returns:
      true if the type is a class or interface type
    • isArray

      boolean isArray()
      Determine whether the type is an array type.
      Returns:
      true if the type is an array type
    • getDimensions

      int getDimensions()
      Get the array type dimensions.

      Examples: [I (that is, int[]) will return 1, [[J (that is, long[][]) will return 2

      Returns:
      the number of dimensions
    • isPrimitive

      boolean isPrimitive()
      Determine whether the type is a primitive type.
      Returns:
      true if the type is a primitive type
    • isArrayOfPrimitive

      boolean isArrayOfPrimitive()
      Determine whether the type is an array of primitives.
      Returns:
      true if the type is an array of primitive values
    • getNonArrayClass

      String getNonArrayClass()
      Retrieve the non-array signature of a class or interface type. Will return null for primitives or arrays of primitives.

      Example: type is [La/b/Foo the method will return La/b/Foo

      Returns:
      the non-array class signature, or null if not applicable
    • getMasterType

      IDexType getMasterType()
      Retrieve the base type of an array type.

      Example: if this type is [[I, the method will return the type object for I

      Returns:
      the array base type, or this type if it is not an array
    • getDependantTypes

      List<IDexType> getDependantTypes()
      Retrieve the list of array types based on this type.
      Returns:
      the dependent array types
    • getSignature

      String getSignature()
      Generate the type signature. The generated signature represents the effective name in internal form.
      Specified by:
      getSignature in interface ICodeItem
      Returns:
      the effective 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 qualifiedNames)
      Generate the type signature.
      Parameters:
      effective - true to use the effective names (renames), false to use the original names
      internal - true to generate an internal signature (Lcom/abc/Foo;), false to generate a user-friendly signature (com.abc.Foo)
      qualifiedNames - true to generate qualified names (a.b.c.Foo), false to generate simple type names (Foo)
      Returns:
      the type signature