Package soot.toolkits.scalar
Class SmartLocalDefs
- java.lang.Object
-
- soot.toolkits.scalar.SmartLocalDefs
-
- All Implemented Interfaces:
LocalDefs
public class SmartLocalDefs extends Object implements LocalDefs
Analysis that provides an implementation of the LocalDefs interface. This Analysis calculates only the definitions of the locals used by a unit. If you need all definitions of local you should use {@see SimpleLocalDefs}. Be warned: This implementation requires a lot of memory and CPU time, normally {@see SimpleLocalDefs} is much faster.
-
-
Constructor Summary
Constructors Constructor Description SmartLocalDefs(UnitGraph g, LiveLocals live)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Unit>getDefsOf(Local l)Returns the definition sites for a Local merged over all points in a method.List<Unit>getDefsOfAt(Local l, Unit s)Returns the definition sites for a Local at a certain point (Unit) in a method.UnitGraphgetGraph()Returns the associated unit graph.voidprintAnswer()
-
-
-
Constructor Detail
-
SmartLocalDefs
public SmartLocalDefs(UnitGraph g, LiveLocals live)
-
-
Method Detail
-
printAnswer
public void printAnswer()
-
getDefsOfAt
public List<Unit> getDefsOfAt(Local l, Unit s)
Description copied from interface:LocalDefsReturns the definition sites for a Local at a certain point (Unit) in a method. You can assume this method never returnsnull.- Specified by:
getDefsOfAtin interfaceLocalDefs- 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. If there are no uses an empty list will returned.
-
getDefsOf
public List<Unit> getDefsOf(Local l)
Description copied from interface:LocalDefsReturns the definition sites for a Local merged over all points in a method. You can assume this method never returnsnull.
-
getGraph
public UnitGraph getGraph()
Returns the associated unit graph.
-
-