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:
    • isArray

      boolean isArray()
      Determine whether the type is an array type.
      Returns:
    • 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:
    • isArrayOfPrimitive

      boolean isArrayOfPrimitive()
      Determine whether the type is an array of primitives.
      Returns:
    • 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:
    • 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:
    • getDependantTypes

      List<IDexType> getDependantTypes()
      Retrieve the list of array types based on this type.
      Returns:
    • 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)
      Generate the type signature.
      Specified by:
      getSignature in interface ICodeItem
      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)
      Returns:
      the type 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