soot
Class ArrayType

java.lang.Object
  |
  +--soot.Type
        |
        +--soot.ArrayType
All Implemented Interfaces:
RefLikeType, java.io.Serializable, Switchable, ToBriefString

public class ArrayType
extends Type
implements RefLikeType

A class that models Java's array types. ArrayTypes are parametrized by a BaseType and and an integer representing the array's dimension count.. Two ArrayType are 'equal' if they are parametrized equally.

See Also:
Serialized Form

Field Summary
 BaseType baseType
          baseType can be any type except for an array type, null and void
 int numDimensions
          dimension count for the array type
 
Fields inherited from class soot.Type
typeNum
 
Method Summary
 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()
           
 Type getElementType()
           
 int hashCode()
           
 java.lang.String toBriefString()
          Returns a brief textual representation of this type.
 java.lang.String toString()
          Returns a textual representation of this type.
static ArrayType v(BaseType baseType, int numDimensions)
          Creates an ArrayType parametrized by a given BaseType and dimension count.
 
Methods inherited from class soot.Type
merge, toMachineType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

baseType

public final BaseType baseType
baseType can be any type except for an array type, null and void

See Also:
BaseType

numDimensions

public final int numDimensions
dimension count for the array type

Method Detail

v

public static ArrayType v(BaseType baseType,
                          int numDimensions)
Creates an ArrayType parametrized by a given BaseType and dimension count.

Parameters:
baseType - a BaseType to parametrize the ArrayType
numDimensions - the dimension count to parametrize the ArrayType.
Returns:
an ArrayType parametrized accrodingly.

equals

public boolean equals(java.lang.Object t)
Two ArrayType are 'equal' if they are parametrized identically. (ie have same BaseType and dimension count.

Overrides:
equals in class java.lang.Object
Parameters:
t - object to test for equality
Returns:
true if t is an ArrayType and is parametrized identically to this.

toBriefString

public java.lang.String toBriefString()
Description copied from class: Type
Returns a brief textual representation of this type.

Specified by:
toBriefString in interface ToBriefString
Overrides:
toBriefString in class Type

toString

public java.lang.String toString()
Description copied from class: Type
Returns a textual representation of this type.

Specified by:
toString in class Type

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

apply

public void apply(Switch sw)
Description copied from class: Type
Method required for use of Switchable.

Specified by:
apply in interface Switchable
Overrides:
apply in class Type

getArrayElementType

public Type getArrayElementType()
Specified by:
getArrayElementType in interface RefLikeType

getElementType

public Type getElementType()