soot.jimple
Class Constant

java.lang.Object
  extended by soot.jimple.Constant
All Implemented Interfaces:
Serializable, EquivTo, Immediate, ConvertToBaf, Switchable, Value
Direct Known Subclasses:
ClassConstant, NullConstant, NumericConstant, SEvaluator.MetaConstant, StringConstant

public abstract class Constant
extends Object
implements Value, ConvertToBaf, Immediate

See Also:
Serialized Form

Constructor Summary
Constant()
           
 
Method Summary
 Object clone()
          Clones the current constant.
 void convertToBaf(JimpleToBafContext context, List<Unit> out)
          Adds a Baf instruction pushing this constant to the stack onto out.
 int equivHashCode()
          Returns a hash code consistent with structural equality for this object.
 boolean equivTo(Object c)
          Returns true if this object is structurally equivalent to c.
 List getUseBoxes()
          Returns a List of boxes corresponding to Values which are used by (ie contained within) this Value.
 void toString(UnitPrinter up)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface soot.Value
getType
 
Methods inherited from interface soot.util.Switchable
apply
 

Constructor Detail

Constant

public Constant()
Method Detail

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

convertToBaf

public void convertToBaf(JimpleToBafContext context,
                         List<Unit> out)
Adds a Baf instruction pushing this constant to the stack onto out.

Specified by:
convertToBaf in interface ConvertToBaf

clone

public Object clone()
Clones the current constant. Not implemented here.

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

equivTo

public boolean equivTo(Object c)
Returns true if this object is structurally equivalent to c. For Constants, equality is structural equality, so we just call equals().

Specified by:
equivTo in interface EquivTo

equivHashCode

public int equivHashCode()
Returns a hash code consistent with structural equality for this object. For Constants, equality is structural equality; we hope that each subclass defines hashCode() correctly.

Specified by:
equivHashCode in interface EquivTo

toString

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