Package soot.dexpler

Class DexType


  • public class DexType
    extends Object
    Wrapper for a dexlib TypeIdItem.
    • Field Detail

      • type

        protected org.jf.dexlib2.iface.reference.TypeReference type
    • Constructor Detail

      • DexType

        public DexType​(org.jf.dexlib2.iface.reference.TypeReference type)
      • DexType

        public DexType​(String type)
    • Method Detail

      • getName

        public String getName()
      • overwriteEquivalent

        public boolean overwriteEquivalent​(DexType field)
      • getType

        public org.jf.dexlib2.iface.reference.TypeReference getType()
      • toSoot

        public Type toSoot()
        Return the appropriate Soot Type for this DexType.
        Returns:
        the Soot Type
      • toSoot

        public static Type toSoot​(org.jf.dexlib2.iface.reference.TypeReference type)
        Return the appropriate Soot Type for the given TypeReference.
        Parameters:
        type - the TypeReference to convert
        Returns:
        the Soot Type
      • toSoot

        public static Type toSoot​(String type)
      • isWide

        public static boolean isWide​(org.jf.dexlib2.iface.reference.TypeReference typeReference)
        Return if the given TypeIdItem is wide (i.e. occupies 2 registers).
        Parameters:
        typeReference - .getType() the TypeIdItem to analyze
        Returns:
        if type is wide
      • isWide

        public static boolean isWide​(String type)
      • toSootICAT

        public static String toSootICAT​(String type)
        Seems that representation of Annotation type in Soot is not consistent with the normal type representation. Normal type representation would be a.b.c.ClassName Java bytecode representation is La/b/c/ClassName; Soot Annotation type representation (and Jasmin's) is a/b/c/ClassName. This method transforms the Java bytecode representation into the Soot annotation type representation. Ljava/lang/Class;>; becomes java/lang/Class>
        Parameters:
        type -
        pos -
        Returns:
      • toDalvikICAT

        public static String toDalvikICAT​(String type)
      • toSootAT

        public static String toSootAT​(String type)
        Types read from annotations should be converted to Soot type. However, to maintain compatibility with Soot code most type will not be converted.
        Parameters:
        type -
        Returns: