public class ArrayType extends RefLikeType
Modifier and Type | Field and Description |
---|---|
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
|
Modifier and Type | Method and Description |
---|---|
void |
apply(Switch sw)
Method required for use of Switchable.
|
boolean |
equals(java.lang.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() |
boolean |
isAllowedInFinalCode()
Returns
true if this type is allowed to appear in
final (clean) Jimple code. |
ArrayType |
makeArrayType() |
java.lang.String |
toQuotedString()
Returns a textual representation, quoted as needed, of this type for serialization, e.g.
|
java.lang.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.
|
getArrayType, getEscapedName, getNumber, merge, setArrayType, setNumber, toMachineType
public final Type baseType
public final int numDimensions
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(java.lang.Object t)
equals
in class java.lang.Object
t
- object to test for equalitypublic void toString(UnitPrinter up)
public java.lang.String toString()
Type
public java.lang.String toQuotedString()
toQuotedString
in class Type
public int hashCode()
hashCode
in class java.lang.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
public boolean isAllowedInFinalCode()
Type
true
if this type is allowed to appear in
final (clean) Jimple code.isAllowedInFinalCode
in class Type