edu.umd.cs.findbugs.detect
public class Stream extends ResourceCreationPoint implements Comparable<Stream>
TODO: change streamClass and streamBase to ObjectType
TODO: isStreamOpen() and isStreamClose() should probably be abstract, so we can customize how they work for different kinds of streams
Constructor Summary | |
---|---|
Stream(Location location, String streamClass, String streamBase)
Constructor.
|
Method Summary | |
---|---|
int | compareTo(Stream other) |
String | getBugType() |
int | getInstanceParam() |
Location | getOpenLocation() |
String | getStreamBase() |
boolean | ignoreImplicitExceptions() |
boolean | isClosed()
Return whether or not the Stream is closed on all paths
out of the method. |
boolean | isOpenOnCreation() |
boolean | isStreamClose(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, ResourceValueFrame frame, RepositoryLookupFailureCallback lookupFailureCallback) |
boolean | isStreamOpen(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, ResourceValueFrame frame) |
boolean | isUninteresting() |
void | setClosed()
Set this Stream has having been closed on all
paths out of the method. |
Stream | setIgnoreImplicitExceptions(boolean enable)
Mark whether or not implicit exception edges should be
ignored by ResourceValueAnalysis when determining whether or
not stream is closed on all paths out of method. |
void | setInstanceParam(int instanceParam)
Set the number of the parameter which passes the
stream instance.
|
Stream | setInteresting(String bugType)
Mark this Stream as interesting.
|
Stream | setIsOpenOnCreation(boolean enable)
Mark whether or not Stream is open as soon as it is created,
or whether a later method or constructor must explicitly
open it. |
void | setOpenLocation(Location openLocation) |
Parameters: location where the stream is created streamClass type of Stream streamBase highest class in the class hierarchy through which stream's close() method could be called
Parameters: instanceParam number of the parameter passing the stream instance
Parameters: bugType the bug type that should be reported if the stream is not closed on all paths out of the method