blob: 3b847d0a908317c3e204c0021e93adf75a96d15a [file] [log] [blame]
<title>FindBugs sourceInfo file</title>
<link rel="stylesheet" type="text/css" href="findbugs.css">
<table width="100%"><tr>
<td bgcolor="#b9b9fe" valign="top" align="left" width="20%">
<table width="100%" cellspacing="0" border="0">
<tr><td><a class="sidebar" href="index.html"><img src="umdFindbugs.png" alt="FindBugs"></a></td></tr>
<tr><td><b>Docs and Info</b></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="findbugs2.html">FindBugs 2.0</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="demo.html">Demo and data</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="users.html">Users and supporters</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="">FindBugs blog</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="factSheet.html">Fact sheet</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="manual/index.html">Manual</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="ja/manual/index.html">Manual(ja/&#26085;&#26412;&#35486;)</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="FAQ.html">FAQ</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="bugDescriptions.html">Bug descriptions</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="mailingLists.html">Mailing lists</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="publications.html">Documents and Publications</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="links.html">Links</a></font></td></tr>
<tr><td><a class="sidebar" href="downloads.html"><b>Downloads</b></a></td></tr>
<tr><td><a class="sidebar" href=""><b>FindBugs Swag</b></a></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="">Open bugs</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="reportingBugs.html">Reporting bugs</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="contributing.html">Contributing</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="team.html">Dev team</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="api/index.html">API</a> <a class="sidebar" href="api/overview-summary.html">[no frames]</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="Changes.html">Change log</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="">SF project page</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="">Browse source</a></font></td></tr>
<tr><td><font size="-1"><a class="sidebar" href="">Latest code changes</a></font></td></tr>
<td align="left" valign="top">
<h1>FindBugs sourceInfo file</h1>
<p>The FindBugs analysis engine can be invoked with an optional sourceInfo
file. This file gives line number ranges for classes, files and methods. This
information is an alternative to getting line number information
from the classfiles for methods. Since classfiles only contain line number
for methods, without a sourceInfo file we can't provide line numbers for fields,
and for classes we just use the line numbers of the methods in the class.
<p>The first line of the file should be
sourceInfo version 1.0
<p>Following that are a series of lines, each describing a class, field, or method. For each, a starting and ending line number is provided. For example, the following sourceInfo file:
sourceInfo version 1.0
provides the following information about the class a.C:
<li> fields x and y are both declared on line 4.
<li> the method <code>int f(int)</code> is defined on line 5.
<li> the method <code>int g(Object)</code> is defined on lines 6-7.
<li> the void constructor for a.C is defined on line 8.
The classnames should be the same format as used by Class.getName():
packages are separated by ., inner class names are separated by $.
Thus, if the class a.C had an inner class X and it was onb lines 10-15 of the file, the sourceInfo file might contain:
<hr> <p>
<script language="JavaScript" type="text/javascript">
<!---//hide script from old browsers
document.write( "Last updated "+ document.lastModified + "." );
//end hiding contents --->
<p> Send comments to <a class="sidebar" href=""></a>
<A href=""><IMG src=";type=5" width="210" height="62" border="0" alt=" Logo" /></A>