soot.jimple.internal
Class JArrayRef

java.lang.Object
  extended by soot.jimple.internal.JArrayRef
All Implemented Interfaces:
Serializable, EquivTo, ArrayRef, ConcreteRef, ConvertToBaf, Ref, Switchable, Value
Direct Known Subclasses:
GArrayRef

public class JArrayRef
extends Object
implements ArrayRef, ConvertToBaf

See Also:
Serialized Form

Field Summary
protected  ValueBox baseBox
           
protected  ValueBox indexBox
           
 
Constructor Summary
protected JArrayRef(ValueBox baseBox, ValueBox indexBox)
           
  JArrayRef(Value base, Value index)
           
 
Method Summary
 void apply(Switch sw)
          Called when this object is visited.
 Object clone()
          Returns a clone of this Value.
 void convertToBaf(JimpleToBafContext context, List<Unit> out)
           
 int equivHashCode()
          Returns a hash code for this object, consistent with structural equality.
 boolean equivTo(Object o)
          Returns true if this object is equivalent to o.
 Value getBase()
           
 ValueBox getBaseBox()
           
 Value getIndex()
           
 ValueBox getIndexBox()
           
 Type getType()
          Returns the Soot type of this Value.
 List getUseBoxes()
          Returns a List of boxes corresponding to Values which are used by (ie contained within) this Value.
 void setBase(Local base)
           
 void setIndex(Value index)
           
 String toString()
           
 void toString(UnitPrinter up)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

baseBox

protected ValueBox baseBox

indexBox

protected ValueBox indexBox
Constructor Detail

JArrayRef

public JArrayRef(Value base,
                 Value index)

JArrayRef

protected JArrayRef(ValueBox baseBox,
                    ValueBox indexBox)
Method Detail

clone

public Object clone()
Description copied from interface: Value
Returns a clone of this Value.

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

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()
Returns a hash code for this object, consistent with structural equality.

Specified by:
equivHashCode in interface EquivTo

toString

public String toString()
Overrides:
toString in class Object

toString

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

getBase

public Value getBase()
Specified by:
getBase in interface ArrayRef

setBase

public void setBase(Local base)
Specified by:
setBase in interface ArrayRef

getBaseBox

public ValueBox getBaseBox()
Specified by:
getBaseBox in interface ArrayRef

getIndex

public Value getIndex()
Specified by:
getIndex in interface ArrayRef

setIndex

public void setIndex(Value index)
Specified by:
setIndex in interface ArrayRef

getIndexBox

public ValueBox getIndexBox()
Specified by:
getIndexBox in interface ArrayRef

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()
Description copied from interface: Value
Returns the Soot type of this Value.

Specified by:
getType in interface ArrayRef
Specified by:
getType in interface Value

apply

public void apply(Switch sw)
Description copied from interface: Switchable
Called when this object is visited.

Specified by:
apply in interface ArrayRef
Specified by:
apply in interface Switchable

convertToBaf

public void convertToBaf(JimpleToBafContext context,
                         List<Unit> out)
Specified by:
convertToBaf in interface ConvertToBaf