edu.umd.cs.findbugs.detect
Class FindUnreleasedLock

java.lang.Object
  extended by edu.umd.cs.findbugs.ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>
      extended by edu.umd.cs.findbugs.detect.FindUnreleasedLock
All Implemented Interfaces:
Detector

public class FindUnreleasedLock
extends ResourceTrackingDetector<Lock,FindUnreleasedLock.LockResourceTracker>


Nested Class Summary
private static class FindUnreleasedLock.LockFrameModelingVisitor
           
(package private) static class FindUnreleasedLock.LockResourceTracker
           
 
Field Summary
private static boolean DEBUG
           
private static int numAcquires
           
 
Fields inherited from class edu.umd.cs.findbugs.ResourceTrackingDetector
bugReporter
 
Fields inherited from interface edu.umd.cs.findbugs.Detector
EXP_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
 
Constructor Summary
FindUnreleasedLock(BugReporter bugReporter)
           
 
Method Summary
 FindUnreleasedLock.LockResourceTracker getResourceTracker(ClassContext classContext, org.apache.bcel.classfile.Method method)
           
 void inspectResult(org.apache.bcel.classfile.JavaClass javaClass, org.apache.bcel.generic.MethodGen methodGen, CFG cfg, Dataflow<ResourceValueFrame,ResourceValueAnalysis<Lock>> dataflow, Lock resource)
           
static void main(java.lang.String[] argv)
           
 boolean prescreen(ClassContext classContext, org.apache.bcel.classfile.Method method)
           
 void report()
          This method is called after all classes to be visited.
 
Methods inherited from class edu.umd.cs.findbugs.ResourceTrackingDetector
analyzeMethod, getAnalysisContext, setAnalysisContext, visitClassContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG

numAcquires

private static int numAcquires
Constructor Detail

FindUnreleasedLock

public FindUnreleasedLock(BugReporter bugReporter)
Method Detail

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