soot.toolkits.scalar
Class SimpleLocalDefs

java.lang.Object
  extended by soot.toolkits.scalar.SimpleLocalDefs
All Implemented Interfaces:
LocalDefs

public class SimpleLocalDefs
extends Object
implements LocalDefs

Analysis that provides an implementation of the LocalDefs interface.


Constructor Summary
SimpleLocalDefs(UnitGraph g)
          Computes the analysis given a UnitGraph computed from a method body.
 
Method Summary
 List<Unit> getDefsOfAt(Local l, Unit s)
          Returns the definition sites for a Local at a certain point (Unit) in a method.
 boolean hasDefsAt(Local l, Unit s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLocalDefs

public SimpleLocalDefs(UnitGraph g)
Computes the analysis given a UnitGraph computed from a method body. It is recommended that a ExceptionalUnitGraph (or similar) be provided for correct results in the case of exceptional control flow.

Parameters:
g - a graph on which to compute the analysis.
See Also:
ExceptionalUnitGraph
Method Detail

hasDefsAt

public boolean hasDefsAt(Local l,
                         Unit s)

getDefsOfAt

public List<Unit> getDefsOfAt(Local l,
                              Unit s)
Description copied from interface: LocalDefs
Returns the definition sites for a Local at a certain point (Unit) in a method.

Specified by:
getDefsOfAt in interface LocalDefs
Parameters:
l - the Local in question.
s - a unit that specifies the method context (location) to query for the definitions of the Local.
Returns:
a list of Units where the local is defined in the current method context.