class SpotbugsReportGenerator extends java.lang.Object implements SpotBugsInfo
The reporter controls the generation of the SpotBugs report. It contains call back methods which gets called by SpotBugs if a bug is found.
| Modifiers | Name | Description |
|---|---|---|
private static java.util.regex.Pattern |
INNER_CLASS_PATTERN |
Pre-compiled pattern for removing inner class suffixes. |
| Type | Name and description |
|---|---|
static java.lang.String |
COLUMN_BUGS_KEYThe key to get the column title for the bugs. |
static java.lang.String |
COLUMN_BUG_KEYThe key to get the column title for the bug. |
static java.lang.String |
COLUMN_CATEGORY_KEYThe key to get the column title for the category. |
static java.lang.String |
COLUMN_CLASSES_KEYThe key to column title for the Classes. |
static java.lang.String |
COLUMN_CLASS_KEYThe key to column title for the Class. |
static java.lang.String |
COLUMN_DETAILS_KEYThe key to get the column title for the details. |
static java.lang.String |
COLUMN_ERRORS_KEYThe key to column title for the errors. |
static java.lang.String |
COLUMN_FILES_KEYThe key to column title for the files. |
static java.lang.String |
COLUMN_LINE_KEYThe key to get the column title for the line. |
static java.lang.String |
COLUMN_MISSINGCLASSES_KEYThe key to column title for the files. |
static java.lang.String |
COLUMN_PRIORITY_KEYThe key to get the column title for the priority. |
static java.lang.String |
DETAILSLINK_KEYThe key to get the link to SpotBugs description page from the bundle. |
static java.lang.String |
EFFORT_KEYThe key to get the effort of the report from the bundle. |
static java.lang.String |
FILES_KEYThe key to get the files title of the Plug-In from the bundle. |
static java.lang.String |
LINKTITLE_KEYThe key to get the report link title of the Plug-In from the bundle. |
static java.lang.String |
LINK_KEYThe key to get the report link of the Plug-In from the bundle. |
static java.lang.String |
NOLINE_KEYThe key to get the value if the line number is not available. |
static java.lang.String |
REPORT_TITLE_KEYThe key to get the report title of the Plug-In from the bundle. |
static java.lang.String |
SUMMARY_KEYThe key to get the files title of the Plug-In from the bundle. |
static java.lang.String |
THRESHOLD_KEYThe key to get the threshold of the report from the bundle. |
static java.lang.String |
VERSIONTITLE_KEYThe key to get the version title for SpotBugs from the bundle. |
java.util.List<java.lang.String> |
bugClassesBug classes. |
int |
bugCountThe running total of bugs reported. |
java.util.ResourceBundle |
bundleThe bundle to get the messages from. |
java.util.List<java.lang.String> |
compileSourceRootsThe directories containing the sources to be compiled. |
java.lang.String |
currentClassNameThe name of the current class which is analysed by SpotBugs. |
java.lang.String |
effortThe used effort for searching bugs. |
int |
errorCountThe running total of errors reported. |
int |
fileCountThe running total of files analyzed. |
boolean |
includeTestsRun Spotbugs on the tests. |
boolean |
isJXRReportEnabledSignals if the jxr report plugin is enabled. |
Log |
logThe logger to write logs to. |
int |
missingClassCountThe running total of missing classes reported. |
java.util.Set |
missingClassSetThe Set of missing classes names reported. |
java.io.File |
outputDirectoryLocation where generated html will be created. |
org.apache.maven.doxia.sink.Sink |
sinkThe sink to write the report to. |
groovy.xml.slurpersupport.GPathResult |
spotbugsResultsSpotbugs results. |
java.util.List<java.lang.String> |
testSourceRootsThe directories containing the test-sources to be compiled. |
java.lang.String |
thresholdThe threshold of bugs severity. |
java.io.File |
xrefLocationLocation of the Xrefs to link to. |
java.io.File |
xrefTestLocationLocation of the Test Xrefs to link to. |
| Constructor and description |
|---|
SpotbugsReportGenerator(org.apache.maven.doxia.sink.Sink sink, java.util.ResourceBundle bundle)Default constructor. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected java.lang.String |
assembleJxrHyperlink(groovy.xml.slurpersupport.GPathResult line)Assembles the hyperlink to point to the source code. |
|
private void |
doHeading()Prints the top header sections of the report. |
|
void |
generateReport() |
|
protected java.lang.String |
getReportTitle()Gets the report title. |
|
protected void |
openClassReportSection(java.lang.String bugClass)Initialized a bug report section in the report for a particular class. |
|
void |
printBody()
|
|
protected void |
printBug(java.lang.String bugClass)Print the bug collection to a line in the table |
|
protected void |
printFilesSummary()Print the File Summary Section. |
|
protected void |
printSummary()Print the Summary Section. |
|
protected java.lang.String |
valueForLine(groovy.xml.slurpersupport.GPathResult line)Return the value to display. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Pre-compiled pattern for removing inner class suffixes.
The key to get the column title for the bugs.
The key to get the column title for the bug.
The key to get the column title for the category.
The key to column title for the Classes.
The key to column title for the Class.
The key to get the column title for the details.
The key to column title for the errors.
The key to column title for the files. note: not used but throughout properties
The key to get the column title for the line.
The key to column title for the files.
The key to get the column title for the priority.
The key to get the link to SpotBugs description page from the bundle.
The key to get the effort of the report from the bundle.
The key to get the files title of the Plug-In from the bundle.
The key to get the report link title of the Plug-In from the bundle.
The key to get the report link of the Plug-In from the bundle.
The key to get the value if the line number is not available.
The key to get the report title of the Plug-In from the bundle.
The key to get the files title of the Plug-In from the bundle.
The key to get the threshold of the report from the bundle.
The key to get the version title for SpotBugs from the bundle.
Bug classes.
The running total of bugs reported.
The bundle to get the messages from.
The directories containing the sources to be compiled.
The name of the current class which is analysed by SpotBugs.
The used effort for searching bugs.
The running total of errors reported.
The running total of files analyzed.
Run Spotbugs on the tests.
Signals if the jxr report plugin is enabled.
The logger to write logs to.
The running total of missing classes reported.
The Set of missing classes names reported.
Location where generated html will be created.
The sink to write the report to.
Spotbugs results.
The directories containing the test-sources to be compiled.
The threshold of bugs severity.
Location of the Xrefs to link to.
Location of the Test Xrefs to link to.
Default constructor.
sink
- The sink to generate the report.bundle
- The resource bundle to get the messages from.Assembles the hyperlink to point to the source code.
line
- The line number object with the bug.lineNumber
- The line number to show in the hyperlink.Prints the top header sections of the report.
Gets the report title.
Initialized a bug report section in the report for a particular class.
Print the bug collection to a line in the table
bugInstance
- the bug to printPrint the File Summary Section.
Print the Summary Section.
Return the value to display. If SpotBugs does not provide a line number, a default message is returned. The line number otherwise.
line
- The line to get the value from.spotbugs-maven-plugin Groovy Documentation