public final class FindOpenStream extends ResourceTrackingDetector<Stream,StreamResourceTracker> implements StatelessDetector
bugAccumulator, bugReporter
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
Constructor and Description |
---|
FindOpenStream(BugReporter bugReporter) |
Modifier and Type | Method and Description |
---|---|
void |
analyzeMethod(ClassContext classContext,
org.apache.bcel.classfile.Method method,
StreamResourceTracker resourceTracker,
ResourceCollection<Stream> resourceCollection) |
java.lang.Object |
clone() |
StreamResourceTracker |
getResourceTracker(ClassContext classContext,
org.apache.bcel.classfile.Method method) |
void |
inspectResult(ClassContext classContext,
org.apache.bcel.generic.MethodGen methodGen,
CFG cfg,
Dataflow<ResourceValueFrame,ResourceValueAnalysis<Stream>> dataflow,
Stream stream) |
static boolean |
isMainMethod(org.apache.bcel.classfile.Method method) |
boolean |
prescreen(ClassContext classContext,
org.apache.bcel.classfile.Method method,
boolean mightClose) |
void |
visitClassContext(ClassContext classContext)
Visit the ClassContext for a class which should be analyzed for instances
of bug patterns.
|
report
public FindOpenStream(BugReporter bugReporter)
public java.lang.Object clone()
clone
in interface StatelessDetector
clone
in class java.lang.Object
public void visitClassContext(ClassContext classContext)
Detector
visitClassContext
in interface Detector
visitClassContext
in class ResourceTrackingDetector<Stream,StreamResourceTracker>
classContext
- the ClassContextpublic boolean prescreen(ClassContext classContext, org.apache.bcel.classfile.Method method, boolean mightClose)
prescreen
in class ResourceTrackingDetector<Stream,StreamResourceTracker>
public StreamResourceTracker getResourceTracker(ClassContext classContext, org.apache.bcel.classfile.Method method)
getResourceTracker
in class ResourceTrackingDetector<Stream,StreamResourceTracker>
public static boolean isMainMethod(org.apache.bcel.classfile.Method method)
public void analyzeMethod(ClassContext classContext, org.apache.bcel.classfile.Method method, StreamResourceTracker resourceTracker, ResourceCollection<Stream> resourceCollection) throws CFGBuilderException, DataflowAnalysisException
analyzeMethod
in class ResourceTrackingDetector<Stream,StreamResourceTracker>
CFGBuilderException
DataflowAnalysisException
public void inspectResult(ClassContext classContext, org.apache.bcel.generic.MethodGen methodGen, CFG cfg, Dataflow<ResourceValueFrame,ResourceValueAnalysis<Stream>> dataflow, Stream stream)
inspectResult
in class ResourceTrackingDetector<Stream,StreamResourceTracker>
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.