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(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() |
String |
toQuotedString()
Returns a textual representation, quoted as needed, of this type for serialization, e.g.
|
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, toMachineTypepublic 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(Object t)
public void toString(UnitPrinter up)
public String toString()
Typepublic String toQuotedString()
toQuotedString in class Typepublic void apply(Switch sw)
Typeapply in interface Switchableapply in class Typepublic Type getArrayElementType()
getArrayElementType in class RefLikeTypepublic Type getElementType()
public ArrayType makeArrayType()
makeArrayType in class Typepublic boolean isAllowedInFinalCode()
Typetrue if this type is allowed to appear in final (clean) Jimple code.isAllowedInFinalCode in class TypeCopyright © 2020 Soot OSS. All rights reserved.