Package soot.toolkits.scalar
Class SimpleLocalUses
- java.lang.Object
-
- soot.toolkits.scalar.SimpleLocalUses
-
- All Implemented Interfaces:
LocalUses
public class SimpleLocalUses extends Object implements LocalUses
Analysis that implements the LocalUses interface. Uses for a Local defined at a given Unit are returned as a list of UnitValueBoxPairs each containing a Unit that use the local and the Local itself wrapped in a ValueBox.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface soot.toolkits.scalar.LocalUses
LocalUses.Factory
-
-
Constructor Summary
Constructors Constructor Description SimpleLocalUses(Body body, LocalDefs localDefs)Construct the analysis from a method body and a LocalDefs interface.SimpleLocalUses(UnitGraph graph, LocalDefs localDefs)Construct the analysis from a UnitGraph representation of a method body and a LocalDefs interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Local>getUnusedVariables()Gets all variables that are not used in this bodySet<Local>getUsedVariables()Gets all variables that are used in this bodyList<UnitValueBoxPair>getUsesOf(Unit s)Uses for a Local defined at a given Unit are returned as a list of UnitValueBoxPairs each containing a Unit that use the local and the Local itself wrapped in a ValueBox.
-
-
-
Constructor Detail
-
SimpleLocalUses
public SimpleLocalUses(UnitGraph graph, LocalDefs localDefs)
Construct the analysis from a UnitGraph representation of a method body and a LocalDefs interface. This supposes that a LocalDefs analysis must have been computed prior.Note: If you do not already have a UnitGraph, it may be cheaper to use the constructor which only requires a Body.
-
-
Method Detail
-
getUsesOf
public List<UnitValueBoxPair> getUsesOf(Unit s)
Uses for a Local defined at a given Unit are returned as a list of UnitValueBoxPairs each containing a Unit that use the local and the Local itself wrapped in a ValueBox.
-
getUsedVariables
public Set<Local> getUsedVariables()
Gets all variables that are used in this body- Returns:
- The list of variables used in this body
-
-