Package soot
Class Type
- java.lang.Object
-
- soot.Type
-
- All Implemented Interfaces:
Serializable,Numberable,Switchable
- Direct Known Subclasses:
BottomType,DoubleWordType,ErroneousType,PrimType,RefLikeType,StmtAddressType,UnknownType,VoidType,WordType
public abstract class Type extends Object implements Switchable, Serializable, Numberable
Represents types within Soot, egint,java.lang.String.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Type()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidapply(Switch sw)Method required for use of Switchable.ArrayTypegetArrayType()TypegetDefaultFinalType()If this type is not allowed in final code, this method provides a replacement type that is allowed in final codeStringgetEscapedName()Deprecated.intgetNumber()booleanisAllowedInFinalCode()Returnstrueif this type is allowed to appear in final (clean) Jimple code.ArrayTypemakeArrayType()Typemerge(Type other, Scene cm)Returns the least common superclass of this type and other.voidsetArrayType(ArrayType at)voidsetNumber(int number)static TypetoMachineType(Type t)Converts the int-like types (short, byte, boolean and char) to IntType.StringtoQuotedString()Returns a textual (and quoted as needed) representation of this type for serialization, e.g.abstract StringtoString()Returns a textual representation of this type.
-
-
-
Field Detail
-
arrayType
protected ArrayType arrayType
-
-
Method Detail
-
toString
public abstract String toString()
Returns a textual representation of this type.
-
toQuotedString
public String toQuotedString()
Returns a textual (and quoted as needed) representation of this type for serialization, e.g. to .jimple format
-
getEscapedName
@Deprecated public String getEscapedName()
Deprecated.Returns a textual (and quoted as needed) representation of this type for serialization, e.g. to .jimple format Replaced by toQuotedString; only here for backwards compatibility.
-
toMachineType
public static Type toMachineType(Type t)
Converts the int-like types (short, byte, boolean and char) to IntType.
-
merge
public Type merge(Type other, Scene cm)
Returns the least common superclass of this type and other.
-
apply
public void apply(Switch sw)
Method required for use of Switchable.- Specified by:
applyin interfaceSwitchable
-
setArrayType
public void setArrayType(ArrayType at)
-
getArrayType
public ArrayType getArrayType()
-
makeArrayType
public ArrayType makeArrayType()
-
isAllowedInFinalCode
public boolean isAllowedInFinalCode()
Returnstrueif this type is allowed to appear in final (clean) Jimple code.- Returns:
-
getNumber
public final int getNumber()
- Specified by:
getNumberin interfaceNumberable
-
setNumber
public final void setNumber(int number)
- Specified by:
setNumberin interfaceNumberable
-
getDefaultFinalType
public Type getDefaultFinalType()
If this type is not allowed in final code, this method provides a replacement type that is allowed in final code- Returns:
- The replacement type
-
-