public class RefType extends RefLikeType implements java.lang.Comparable<RefType>
| Constructor and Description |
|---|
RefType(Singletons.Global g) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Switch sw)
Method required for use of Switchable.
|
int |
compareTo(RefType t) |
boolean |
equals(java.lang.Object t)
2 RefTypes are considered equal if they are parametrized by the same
class name String.
|
AnySubType |
getAnySubType() |
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 even
later to answer this question for all classes implementing
RefLikeType.
|
java.lang.String |
getClassName() |
SootClass |
getSootClass()
Get the SootClass object corresponding to this RefType.
|
int |
hashCode() |
boolean |
hasSootClass() |
boolean |
isAllowedInFinalCode()
Returns
true if this type is allowed to appear in
final (clean) Jimple code. |
Type |
merge(Type other,
Scene cm)
Returns the least common superclass of this type and other.
|
void |
setAnySubType(AnySubType anySubType) |
void |
setClassName(java.lang.String className) |
void |
setSootClass(SootClass sootClass)
Set the SootClass object corresponding to this RefType.
|
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.
|
static RefType |
v() |
static RefType |
v(SootClass c)
Create a RefType for a class.
|
static RefType |
v(java.lang.String className)
Create a RefType for a class.
|
getArrayType, getEscapedName, getNumber, makeArrayType, setArrayType, setNumber, toMachineTypepublic static RefType v()
public java.lang.String getClassName()
public static RefType v(java.lang.String className)
className - The name of the class used to parametrize the created RefType.public int compareTo(RefType t)
compareTo in interface java.lang.Comparable<RefType>public static RefType v(SootClass c)
c - A SootClass for which to create a RefType.public SootClass getSootClass()
public boolean hasSootClass()
public void setClassName(java.lang.String className)
public void setSootClass(SootClass sootClass)
sootClass - The SootClass corresponding to this RefType.public boolean equals(java.lang.Object t)
equals in class java.lang.Objectt - an object to test for equality. @ return true if t is a
RefType parametrized by the same name as this.public java.lang.String toString()
Typepublic java.lang.String toQuotedString()
toQuotedString in class Typepublic int hashCode()
hashCode in class java.lang.Objectpublic void apply(Switch sw)
Typeapply in interface Switchableapply in class Typepublic Type merge(Type other, Scene cm)
public Type getArrayElementType()
RefLikeTypegetArrayElementType in class RefLikeTypepublic AnySubType getAnySubType()
public void setAnySubType(AnySubType anySubType)
public boolean isAllowedInFinalCode()
Typetrue if this type is allowed to appear in
final (clean) Jimple code.isAllowedInFinalCode in class Type