Detector
, Priorities
, StatelessDetector
, java.lang.Cloneable
public final class FindOpenStream extends ResourceTrackingDetector<Stream,StreamResourceTracker> implements StatelessDetector
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
bugAccumulator, bugReporter
Constructor | Description |
---|---|
FindOpenStream(BugReporter bugReporter) |
Modifier and Type | Method | 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.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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>
SpotBugs is licensed under the LGPL.