edu.umd.cs.findbugs.ba

Class SourceFinder

public class SourceFinder extends Object

Class to open input streams on source files. It maintains a "source path", which is like a classpath, but for finding source files instead of class files.
Constructor Summary
SourceFinder()
Constructor.
Method Summary
SourceFilefindSourceFile(SourceLineAnnotation source)
SourceFilefindSourceFile(String packageName, String fileName)
Open a source file in given package.
InputStreamopenSource(String packageName, String fileName)
Open an input stream on a source file in given package.
InputStreamopenSource(SourceLineAnnotation source)
voidsetSourceBaseList(List<String> sourceBaseList)
Set the list of source directories.

Constructor Detail

SourceFinder

public SourceFinder()
Constructor.

Method Detail

findSourceFile

public SourceFile findSourceFile(SourceLineAnnotation source)

findSourceFile

public SourceFile findSourceFile(String packageName, String fileName)
Open a source file in given package.

Parameters: packageName the name of the package containing the class whose source file is given fileName the unqualified name of the source file

Returns: the source file

Throws: IOException if a matching source file cannot be found

openSource

public InputStream openSource(String packageName, String fileName)
Open an input stream on a source file in given package.

Parameters: packageName the name of the package containing the class whose source file is given fileName the unqualified name of the source file

Returns: an InputStream on the source file

Throws: IOException if a matching source file cannot be found

openSource

public InputStream openSource(SourceLineAnnotation source)

setSourceBaseList

public void setSourceBaseList(List<String> sourceBaseList)
Set the list of source directories.
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.