edu.umd.cs.findbugs.detect
Class FindUnreleasedLock
java.lang.Object
edu.umd.cs.findbugs.ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>
edu.umd.cs.findbugs.detect.FindUnreleasedLock
- All Implemented Interfaces:
- Detector
public class FindUnreleasedLock
- extends ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
private static final boolean DEBUG
numAcquires
private static int numAcquires
FindUnreleasedLock
public FindUnreleasedLock(BugReporter bugReporter)
prescreen
public boolean prescreen(ClassContext classContext,
org.apache.bcel.classfile.Method method)
- Specified by:
prescreen
in class ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>
getResourceTracker
public FindUnreleasedLock.LockResourceTracker getResourceTracker(ClassContext classContext,
org.apache.bcel.classfile.Method method)
throws CFGBuilderException,
DataflowAnalysisException
- Specified by:
getResourceTracker
in class ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>
- Throws:
CFGBuilderException
DataflowAnalysisException
inspectResult
public void inspectResult(org.apache.bcel.classfile.JavaClass javaClass,
org.apache.bcel.generic.MethodGen methodGen,
CFG cfg,
Dataflow<ResourceValueFrame,ResourceValueAnalysis<Lock>> dataflow,
Lock resource)
- Specified by:
inspectResult
in class ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>
report
public void report()
- Description copied from interface:
Detector
- This method is called after all classes to be visited.
It should be used by any detectors which accumulate information
over all visited classes to generate results.
- Specified by:
report
in interface Detector
- Overrides:
report
in class ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>
main
public static void main(java.lang.String[] argv)
throws java.lang.Exception
- Throws:
java.lang.Exception