edu.umd.cs.findbugs.detect
public class StreamResourceTracker extends Object implements ResourceTracker<Stream>
| Constructor Summary | |
|---|---|
| StreamResourceTracker(StreamFactory[] streamFactoryList, RepositoryLookupFailureCallback lookupFailureCallback)
Constructor.
| |
| Method Summary | |
|---|---|
| void | addStreamEscape(Stream source, Location target)
Indicate that a stream escapes at the given target Location.
|
| void | addStreamOpenLocation(Location streamOpenLocation, Stream stream)
Indicate that a stream is constructed at this Location.
|
| ResourceValueFrameModelingVisitor | createVisitor(Stream resource, ConstantPoolGen cpg) |
| StreamEquivalenceClass | getStreamEquivalenceClass(Stream stream)
Get the equivalence class for given stream.
|
| boolean | ignoreExceptionEdge(Edge edge, Stream resource, ConstantPoolGen cpg) |
| boolean | ignoreImplicitExceptions(Stream resource) |
| boolean | isParamInstance(Stream resource, int slot) |
| boolean | isResourceClose(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, Stream resource, ResourceValueFrame frame) |
| Stream | isResourceCreation(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg) |
| boolean | isResourceOpen(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, Stream resource, ResourceValueFrame frame) |
| boolean | isUninterestingStreamEscape(Stream stream)
Determine if an uninteresting stream escapes at given location.
markTransitiveUninterestingStreamEscapes() should be called first.
|
| void | markTransitiveUninterestingStreamEscapes()
Transitively mark all streams into which uninteresting streams
(such as System.out) escape. |
| void | setResourceCollection(ResourceCollection<Stream> resourceCollection)
Set the precomputed ResourceCollection for the method. |
Parameters: streamFactoryList array of StreamFactory objects which determine where streams are created lookupFailureCallback used when class hierarchy lookups fail
Parameters: source the Stream that is escaping target the target Location (where the stream escapes)
Parameters: streamOpenLocation the Location stream the Stream opened at this Location
Parameters: stream the stream
Returns: the set containing the equivalence class for the given stream
Parameters: stream the stream
Returns: true if an uninteresting stream escapes at the location