FindBugs™ 1.3.9

edu.umd.cs.findbugs.detect
Class MethodReturnValueStreamFactory

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

public class MethodReturnValueStreamFactory
extends java.lang.Object
implements StreamFactory

StreamFactory for streams that are created as the result of calling a method on an object.


Constructor Summary
MethodReturnValueStreamFactory(java.lang.String baseClass, java.lang.String methodName, java.lang.String methodSig)
          Constructor.
MethodReturnValueStreamFactory(java.lang.String baseClass, java.lang.String methodName, java.lang.String methodSig, java.lang.String bugType)
          Constructor.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodReturnValueStreamFactory

public MethodReturnValueStreamFactory(java.lang.String baseClass,
                                      java.lang.String methodName,
                                      java.lang.String methodSig)
Constructor. The Streams created will be marked as uninteresting.

Parameters:
baseClass - base class through which the method will be called (we check instances of the base class and all subtypes)
methodName - name of the method called
methodSig - signature of the method called

MethodReturnValueStreamFactory

public MethodReturnValueStreamFactory(java.lang.String baseClass,
                                      java.lang.String methodName,
                                      java.lang.String methodSig,
                                      java.lang.String bugType)
Constructor. The Streams created will be marked as interesting.

Parameters:
baseClass - base class through which the method will be called (we check instances of the base class and all subtypes)
methodName - name of the method called
methodSig - signature of the method called
bugType - the bug type that should be reported if the stream is not closed on all paths out of the method
Method Detail

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.