abc.soot.util
Class Restructure.JavaTypeInfo

java.lang.Object
  extended by abc.soot.util.Restructure.JavaTypeInfo
Enclosing class:
Restructure

public static class Restructure.JavaTypeInfo
extends java.lang.Object

This class helps implement boxing. It assigns integer IDs to the simple Java types and one ID to all the reference types. It contains methods to retrieve the boxing classes of simple types and their value methods (intVal() etc.)

Author:
Sascha Kuzins

Field Summary
static int booleanType
           
static int byteType
           
static int charType
           
static int doubleType
           
static int floatType
           
static int intType
           
static int longType
           
static int refType
           
static int shortType
           
static int typeCount
           
 
Constructor Summary
Restructure.JavaTypeInfo()
           
 
Method Summary
static SootClass getBoxingClass(Type type)
           
static java.lang.String getBoxingClassMethodName(Type type)
           
static Type getBoxingClassPrimType(SootClass boxingClass)
          Given the boxing class, what was the primitive type?
static Value getDefaultValue(Type type)
           
static java.lang.String getSimpleTypeBoxingClassMethodName(Type type)
           
static char getSimpleTypeConversionInfo(Type from, Type to)
           
static boolean haveCollidingMethod(SootClass cl, SootClass cl2)
           
static boolean implementsInterfaceRecursive(SootClass cl, java.lang.String interfaceName)
           
static boolean isBoxingType(Type type)
           
static boolean isForbiddenConversion(Type from, Type to)
           
static boolean isForbiddenSimpleConversion(Type from, Type to)
           
static boolean isSimpleType(Type t)
           
static boolean isSimpleWideningConversion(Type from, Type to)
           
static int sootTypeToInt(Type type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

booleanType

public static final int booleanType
See Also:
Constant Field Values

byteType

public static final int byteType
See Also:
Constant Field Values

shortType

public static final int shortType
See Also:
Constant Field Values

charType

public static final int charType
See Also:
Constant Field Values

intType

public static final int intType
See Also:
Constant Field Values

longType

public static final int longType
See Also:
Constant Field Values

floatType

public static final int floatType
See Also:
Constant Field Values

doubleType

public static final int doubleType
See Also:
Constant Field Values

refType

public static final int refType
See Also:
Constant Field Values

typeCount

public static final int typeCount
See Also:
Constant Field Values
Constructor Detail

Restructure.JavaTypeInfo

public Restructure.JavaTypeInfo()
Method Detail

getSimpleTypeConversionInfo

public static char getSimpleTypeConversionInfo(Type from,
                                               Type to)

isSimpleType

public static boolean isSimpleType(Type t)

isSimpleWideningConversion

public static boolean isSimpleWideningConversion(Type from,
                                                 Type to)

haveCollidingMethod

public static boolean haveCollidingMethod(SootClass cl,
                                          SootClass cl2)

implementsInterfaceRecursive

public static boolean implementsInterfaceRecursive(SootClass cl,
                                                   java.lang.String interfaceName)

isForbiddenConversion

public static boolean isForbiddenConversion(Type from,
                                            Type to)

isForbiddenSimpleConversion

public static boolean isForbiddenSimpleConversion(Type from,
                                                  Type to)

sootTypeToInt

public static int sootTypeToInt(Type type)

getDefaultValue

public static Value getDefaultValue(Type type)

getBoxingClass

public static SootClass getBoxingClass(Type type)

getBoxingClassMethodName

public static java.lang.String getBoxingClassMethodName(Type type)

getSimpleTypeBoxingClassMethodName

public static java.lang.String getSimpleTypeBoxingClassMethodName(Type type)

getBoxingClassPrimType

public static Type getBoxingClassPrimType(SootClass boxingClass)
Given the boxing class, what was the primitive type?

Parameters:
boxingClass - the boxing class (eg Integer)
Returns:
the primitive type (eg int)

isBoxingType

public static boolean isBoxingType(Type type)