soot
Class EquivalentValue

java.lang.Object
  extended by soot.EquivalentValue
All Implemented Interfaces:
Serializable, EquivTo, Switchable, Value
Direct Known Subclasses:
CachedEquivalentValue

public class EquivalentValue
extends Object
implements Value

Encapsulates the Value class, but uses EquivTo for equality comparisons. Also uses equivHashCode as its hash code.

See Also:
Serialized Form

Constructor Summary
EquivalentValue(Value e)
           
 
Method Summary
 void apply(Switch sw)
          Called when this object is visited.
 Object clone()
          Returns a clone of this Value.
 boolean equals(Object o)
           
 boolean equalsToValue(Value v)
          compares the encapsulated value with v, using equals
 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.
 boolean equivToValue(Value v)
          compares the encapsulated value with v, using equivTo
 Value getDeepestValue()
          returns the deepest Value stored in this.
 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.
 Value getValue()
           
 int hashCode()
           
 String toString()
           
 void toString(UnitPrinter up)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EquivalentValue

public EquivalentValue(Value e)
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

equivToValue

public boolean equivToValue(Value v)
compares the encapsulated value with v, using equivTo


equalsToValue

public boolean equalsToValue(Value v)
compares the encapsulated value with v, using equals


getDeepestValue

public Value getDeepestValue()
returns the deepest Value stored in this. If the immediate stored value is an EquivalentValue its deepest value is returned.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getValue

public Value getValue()

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 Value

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()
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

apply

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

Specified by:
apply in interface Switchable

toString

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