soot.jimple
Class ParameterRef

java.lang.Object
  extended by soot.jimple.ParameterRef
All Implemented Interfaces:
Serializable, EquivTo, IdentityRef, Ref, Switchable, Value

public class ParameterRef
extends Object
implements IdentityRef

ParameterRef objects are used by Body objects to refer to the parameter slots on method entry.
For instance, in an instance method, the first statement will often be this := @parameter0;

See Also:
Serialized Form

Constructor Summary
ParameterRef(Type paramType, int number)
          Constructs a ParameterRef object of the specified type, representing the specified parameter number.
 
Method Summary
 void apply(Switch sw)
          Used with RefSwitch.
 Object clone()
          Create a new ParameterRef object with the same paramType and number.
 int equivHashCode()
          Returns a (not necessarily fixed) hash code for this object.
 boolean equivTo(Object o)
          Returns true if this object is equivalent to o.
 int getIndex()
          Returns the index of this ParameterRef.
 Type getType()
          Returns the type of this ParameterRef.
 List getUseBoxes()
          Returns a List of boxes corresponding to Values which are used by (ie contained within) this Value.
 void setIndex(int index)
          Sets the index of this ParameterRef.
 String toString()
          Converts the given ParameterRef into a String i.e.
 void toString(UnitPrinter up)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterRef

public ParameterRef(Type paramType,
                    int number)
Constructs a ParameterRef object of the specified type, representing the specified parameter number.

Method Detail

equivTo

public boolean equivTo(Object o)
Description copied from interface: EquivTo
Returns true if this object is equivalent to o.

Specified by:
equivTo in interface EquivTo

equivHashCode

public int equivHashCode()
Description copied from interface: EquivTo
Returns a (not necessarily fixed) hash code for this object. This hash code coincides with equivTo; it is undefined in the presence of mutable objects.

Specified by:
equivHashCode in interface EquivTo

clone

public Object clone()
Create a new ParameterRef object with the same paramType and number.

Specified by:
clone in interface Value
Overrides:
clone in class Object

toString

public String toString()
Converts the given ParameterRef into a String i.e. @parameter0: .int.

Overrides:
toString in class Object

toString

public void toString(UnitPrinter up)
Specified by:
toString in interface Value

getIndex

public int getIndex()
Returns the index of this ParameterRef.


setIndex

public void setIndex(int index)
Sets the index of this ParameterRef.


getUseBoxes

public List getUseBoxes()
Description copied from interface: Value
Returns a List of boxes corresponding to Values which are used by (ie contained within) this Value.

Specified by:
getUseBoxes in interface Value

getType

public Type getType()
Returns the type of this ParameterRef.

Specified by:
getType in interface Value

apply

public void apply(Switch sw)
Used with RefSwitch.

Specified by:
apply in interface Switchable