public abstract class ResourceTrackingDetector<Resource,ResourceTrackerType extends ResourceTracker<Resource>> extends java.lang.Object implements Detector
Modifier and Type | Field and Description |
---|---|
protected BugAccumulator |
bugAccumulator |
protected BugReporter |
bugReporter |
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
Constructor and Description |
---|
ResourceTrackingDetector(BugReporter bugReporter) |
Modifier and Type | Method and Description |
---|---|
void |
analyzeMethod(ClassContext classContext,
org.apache.bcel.classfile.Method method,
ResourceTrackerType resourceTracker,
ResourceCollection<Resource> resourceCollection) |
abstract ResourceTrackerType |
getResourceTracker(ClassContext classContext,
org.apache.bcel.classfile.Method method) |
abstract void |
inspectResult(ClassContext classContext,
org.apache.bcel.generic.MethodGen methodGen,
CFG cfg,
Dataflow<ResourceValueFrame,ResourceValueAnalysis<Resource>> dataflow,
Resource resource) |
abstract boolean |
prescreen(ClassContext classContext,
org.apache.bcel.classfile.Method method,
boolean mightClose) |
void |
report()
This method is called after all classes to be visited.
|
void |
visitClassContext(ClassContext classContext)
Visit the ClassContext for a class which should be analyzed for instances
of bug patterns.
|
protected BugAccumulator bugAccumulator
protected BugReporter bugReporter
public ResourceTrackingDetector(BugReporter bugReporter)
public abstract boolean prescreen(ClassContext classContext, org.apache.bcel.classfile.Method method, boolean mightClose)
public abstract ResourceTrackerType getResourceTracker(ClassContext classContext, org.apache.bcel.classfile.Method method) throws DataflowAnalysisException, CFGBuilderException
public abstract void inspectResult(ClassContext classContext, org.apache.bcel.generic.MethodGen methodGen, CFG cfg, Dataflow<ResourceValueFrame,ResourceValueAnalysis<Resource>> dataflow, Resource resource)
public void visitClassContext(ClassContext classContext)
Detector
visitClassContext
in interface Detector
classContext
- the ClassContextpublic void analyzeMethod(ClassContext classContext, org.apache.bcel.classfile.Method method, ResourceTrackerType resourceTracker, ResourceCollection<Resource> resourceCollection) throws CFGBuilderException, DataflowAnalysisException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.