FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba
Class SourceFinder

java.lang.Object
  extended by edu.umd.cs.findbugs.ba.SourceFinder

public class SourceFinder
extends java.lang.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(Project project)
           
 
Method Summary
 SourceFile findSourceFile(SourceLineAnnotation source)
           
 SourceFile findSourceFile(java.lang.String packageName, java.lang.String fileName)
          Open a source file in given package.
 Project getProject()
           
 boolean hasSourceFile(SourceLineAnnotation source)
           
 boolean hasSourceFile(java.lang.String packageName, java.lang.String fileName)
           
 java.io.InputStream openSource(SourceLineAnnotation source)
           
 java.io.InputStream openSource(java.lang.String packageName, java.lang.String fileName)
          Open an input stream on a source file in given package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceFinder

public SourceFinder(Project project)
Method Detail

getProject

public Project getProject()
Returns:
Returns the project.

openSource

public java.io.InputStream openSource(java.lang.String packageName,
                                      java.lang.String fileName)
                               throws java.io.IOException
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:
java.io.IOException - if a matching source file cannot be found

openSource

public java.io.InputStream openSource(SourceLineAnnotation source)
                               throws java.io.IOException
Throws:
java.io.IOException

findSourceFile

public SourceFile findSourceFile(SourceLineAnnotation source)
                          throws java.io.IOException
Throws:
java.io.IOException

findSourceFile

public SourceFile findSourceFile(java.lang.String packageName,
                                 java.lang.String fileName)
                          throws java.io.IOException
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:
java.io.IOException - if a matching source file cannot be found

hasSourceFile

public boolean hasSourceFile(SourceLineAnnotation source)

hasSourceFile

public boolean hasSourceFile(java.lang.String packageName,
                             java.lang.String fileName)

FindBugs™ 1.3.9

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