edu.rice.cs.cunit.instrumentors.util
Class ScanForObjectCtorStrategy

java.lang.Object
  extended by edu.rice.cs.cunit.instrumentors.util.ScanForObjectCtorStrategy
All Implemented Interfaces:
IInstrumentationStrategy, IScannerStrategy

public class ScanForObjectCtorStrategy
extends java.lang.Object
implements IScannerStrategy

Instrumentation strategy that scans for a "new Object()" operation.

Author:
Mathias Ricken

Nested Class Summary
static class ScanForObjectCtorStrategy.Location
          Storage class for locations that used "new Object()".
 
Nested classes/interfaces inherited from interface edu.rice.cs.cunit.instrumentors.util.IScannerStrategy
IScannerStrategy.IScanResult
 
Field Summary
(package private)  java.util.ArrayList<ScanForObjectCtorStrategy.Location> _locations
          List of usage locations.
static java.lang.String CLASS_SIG_SEPARATOR_STRING
          The separator string between class name and method signature.
 
Constructor Summary
ScanForObjectCtorStrategy()
           
 
Method Summary
 void done()
          Instrumentation of all classes is done.
 java.util.List<ScanForObjectCtorStrategy.Location> getScanResults()
          Returns the list of usage locations.
 void instrument(ClassFile cf)
          Instrument the class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_SIG_SEPARATOR_STRING

public static final java.lang.String CLASS_SIG_SEPARATOR_STRING
The separator string between class name and method signature.

See Also:
Constant Field Values

_locations

java.util.ArrayList<ScanForObjectCtorStrategy.Location> _locations
List of usage locations.

Constructor Detail

ScanForObjectCtorStrategy

public ScanForObjectCtorStrategy()
Method Detail

getScanResults

public java.util.List<ScanForObjectCtorStrategy.Location> getScanResults()
Returns the list of usage locations.

Specified by:
getScanResults in interface IScannerStrategy
Returns:
list of usage locations

instrument

public void instrument(ClassFile cf)
Instrument the class.

Specified by:
instrument in interface IInstrumentationStrategy
Parameters:
cf - class file info

done

public void done()
Instrumentation of all classes is done.

Specified by:
done in interface IInstrumentationStrategy