Package soot.dexpler
Class DexType
- java.lang.Object
-
- soot.dexpler.DexType
-
public class DexType extends Object
Wrapper for a dexlib TypeIdItem.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()org.jf.dexlib2.iface.reference.TypeReferencegetType()static booleanisWide(String type)static booleanisWide(org.jf.dexlib2.iface.reference.TypeReference typeReference)Return if the given TypeIdItem is wide (i.e.booleanoverwriteEquivalent(DexType field)static StringtoDalvikICAT(String type)TypetoSoot()Return the appropriate Soot Type for this DexType.static TypetoSoot(String type)static TypetoSoot(org.jf.dexlib2.iface.reference.TypeReference type)Return the appropriate Soot Type for the given TypeReference.static StringtoSootAT(String type)Types read from annotations should be converted to Soot type.static StringtoSootICAT(String type)Seems that representation of Annotation type in Soot is not consistent with the normal type representation.StringtoString()
-
-
-
Field Detail
-
name
protected String name
-
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
-
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:
-
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:
-
-