edu.umd.cs.findbugs.detect
Class StaticFieldLoadStreamFactory
java.lang.Object
edu.umd.cs.findbugs.detect.StaticFieldLoadStreamFactory
- All Implemented Interfaces:
- StreamFactory
public class StaticFieldLoadStreamFactory
- extends java.lang.Object
- implements StreamFactory
Stream factory for streams created by loading a value
from a static field. This is mainly to handle
System.in, System.out, and System.err.
Constructor Summary |
StaticFieldLoadStreamFactory(java.lang.String streamBaseClass,
java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig)
Constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
streamBaseClass
public java.lang.String streamBaseClass
className
public java.lang.String className
fieldName
public java.lang.String fieldName
fieldSig
public java.lang.String fieldSig
StaticFieldLoadStreamFactory
public StaticFieldLoadStreamFactory(java.lang.String streamBaseClass,
java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig)
- Constructor.
Created Stream objects will be marked as uninteresting.
- Parameters:
streamBaseClass
- the base class of the stream objects created
by the factoryclassName
- name of the class containing the static fieldfieldName
- name of the static fieldfieldSig
- signature of the static field
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 Locationtype
- 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 objectcpg
- the ConstantPoolGen for the methodlookupFailureCallback
- 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™ is licenced under the LGPL. Copyright © 2006 University of Maryland.