|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.Type soot.RefLikeType soot.ArrayType
public class ArrayType
A class that models Java's array types. ArrayTypes are parametrized by a Type and and an integer representing the array's dimension count.. Two ArrayType are 'equal' if they are parametrized equally.
Field Summary | |
---|---|
Type |
baseType
baseType can be any type except for an array type, null and void What is the base type of the array? That is, for an array of type A[][][], how do I find out what the A is? The accepted way of doing this has always been to look at the public field baseType in ArrayType, ever since the very beginning of Soot. |
int |
numDimensions
dimension count for the array type |
Fields inherited from class soot.Type |
---|
arrayType |
Method Summary | |
---|---|
void |
apply(Switch sw)
Method required for use of Switchable. |
boolean |
equals(Object t)
Two ArrayType are 'equal' if they are parametrized identically. |
Type |
getArrayElementType()
If I have a variable x of declared type t, what is a good declared type for the expression ((Object[]) x)[i]? The getArrayElementType() method in RefLikeType was introduced to answer this question for all classes implementing RefLikeType. |
Type |
getElementType()
If I get an element of the array, what will be its type? That is, if I have an array a of type A[][][], what is the type of a[] (it's A[][])? The getElementType() method in ArrayType was introduced to answer this question. |
int |
hashCode()
|
ArrayType |
makeArrayType()
|
String |
toString()
Returns a textual representation of this type. |
void |
toString(UnitPrinter up)
|
static ArrayType |
v(Type baseType,
int numDimensions)
Creates an ArrayType parametrized by a given Type and dimension count. |
Methods inherited from class soot.Type |
---|
getArrayType, getNumber, merge, setArrayType, setNumber, toMachineType |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Type baseType
public final int numDimensions
Method Detail |
---|
public static ArrayType v(Type baseType, int numDimensions)
baseType
- a Type to parametrize the ArrayTypenumDimensions
- the dimension count to parametrize the ArrayType.
public boolean equals(Object t)
equals
in class Object
t
- object to test for equality
public void toString(UnitPrinter up)
public String toString()
Type
toString
in class Type
public int hashCode()
hashCode
in class Object
public void apply(Switch sw)
Type
apply
in interface Switchable
apply
in class Type
public Type getArrayElementType()
getArrayElementType
in class RefLikeType
public Type getElementType()
public ArrayType makeArrayType()
makeArrayType
in class Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |