FindBugs™ 1.3.9

edu.umd.cs.findbugs.detect
Class AnyMethodReturnValueStreamFactory

java.lang.Object
  extended by edu.umd.cs.findbugs.detect.AnyMethodReturnValueStreamFactory
All Implemented Interfaces:
StreamFactory

public class AnyMethodReturnValueStreamFactory
extends java.lang.Object
implements StreamFactory

Factory for stream objects of a particular base class type returned by any method. This factory helps us keep track of streams returned by methods; we don't want to report them, but we do want to keep track of whether or not they are closed, to avoid reporting unclosed streams in the same equivalence class.


Constructor Summary
AnyMethodReturnValueStreamFactory(java.lang.String streamBase)
           
 
Method Summary
 Stream createStream(Location location, org.apache.bcel.generic.ObjectType type, org.apache.bcel.generic.ConstantPoolGen cpg, RepositoryLookupFailureCallback lookupFailureCallback)
          Determine if a Stream is created at given location.
 AnyMethodReturnValueStreamFactory setBugType(java.lang.String bugType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnyMethodReturnValueStreamFactory

public AnyMethodReturnValueStreamFactory(java.lang.String streamBase)
Method Detail

setBugType

public AnyMethodReturnValueStreamFactory setBugType(java.lang.String bugType)

createStream

public Stream createStream(Location location,
                           org.apache.bcel.generic.ObjectType type,
                           org.apache.bcel.generic.ConstantPoolGen cpg,
                           RepositoryLookupFailureCallback lookupFailureCallback)
Description copied from interface: StreamFactory
Determine if a Stream is created at given location.

Specified by:
createStream in interface StreamFactory
Parameters:
location - the Location
type - the ObjectType associated with the instruction at the location; the StreamResourceTracker prescreens for TypedInstructions that are associated with ObjectTypes, since they are the only instructions that could conceivably create a stream object
cpg - the ConstantPoolGen for the method
lookupFailureCallback - used to report missing classes in the class hierarchy
Returns:
a Stream created at the Location, or null if no stream is created there

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.