|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.AbstractBugReporter
edu.umd.cs.findbugs.TextUIBugReporter
org.codehaus.mojo.findbugs.Reporter
public class Reporter
The reporter controls the generation of the FindBugs report. It contains call back methods which gets called by FindBugs if a bug is found.
Field Summary |
---|
Fields inherited from class edu.umd.cs.findbugs.TextUIBugReporter |
---|
outputStream |
Fields inherited from interface edu.umd.cs.findbugs.BugReporter |
---|
NORMAL, SILENT |
Constructor Summary | |
---|---|
Reporter(org.apache.maven.doxia.sink.Sink sink,
ResourceBundle bundle,
org.apache.maven.plugin.logging.Log log,
ThresholdParameter threshold,
boolean isJXRReportEnabled,
EffortParameter effort)
Default constructor. |
Method Summary | |
---|---|
protected String |
assembleJXRHyperlink(edu.umd.cs.findbugs.SourceLineAnnotation line,
String lineNumber)
Assembles the hyperlink to point to the source code. |
protected void |
closeClassReportSection()
Closes the class report section. |
protected void |
doReportBug(edu.umd.cs.findbugs.BugInstance bugInstance)
|
void |
finish()
|
edu.umd.cs.findbugs.SortedBugCollection |
getBugCollection()
|
int |
getBugCount()
|
ResourceBundle |
getBundle()
|
static String |
getCOLUMN_BUG_KEY()
|
static String |
getCOLUMN_BUGS_KEY()
|
static String |
getCOLUMN_CATEGORY_KEY()
|
static String |
getCOLUMN_CLASS_KEY()
|
static String |
getCOLUMN_CLASSES_KEY()
|
static String |
getCOLUMN_DETAILS_KEY()
|
static String |
getCOLUMN_ERRORS_KEY()
|
static String |
getCOLUMN_FILES_KEY()
|
static String |
getCOLUMN_LINE_KEY()
|
static String |
getCOLUMN_MISSINGCLASSES_KEY()
|
String |
getCurrentClassName()
|
static String |
getDETAILSLINK_KEY()
|
static String |
getEFFORT_KEY()
|
EffortParameter |
getEffort()
|
int |
getErrorCount()
|
int |
getFileCount()
|
static String |
getFILES_KEY()
|
boolean |
getIsJXRReportEnabled()
|
static String |
getJXR_PATHPREFIX_KEY()
|
static String |
getLINK_KEY()
|
static String |
getLINKTITLE_KEY()
|
org.apache.maven.plugin.logging.Log |
getMavenLog()
|
groovy.lang.MetaClass |
getMetaClass()
|
boolean |
getMIsCurrentClassReportOpened()
|
int |
getMissingClassCount()
|
Set |
getMissingClassSet()
|
static String |
getNAME_KEY()
|
static String |
getNOLINE_KEY()
|
Object |
getProperty(String name)
|
edu.umd.cs.findbugs.BugReporter |
getRealBugReporter()
Get the real bug reporter at the end of a chain of delegating bug reporters. |
static String |
getREPORT_TITLE_KEY()
|
protected String |
getReportTitle()
Gets the report title. |
org.apache.maven.doxia.sink.Sink |
getSink()
|
static String |
getSUMMARY_KEY()
|
static String |
getTHRESHOLD_KEY()
|
ThresholdParameter |
getThreshold()
|
static String |
getURL_SEPARATOR()
|
static String |
getVERSIONTITLE_KEY()
|
Object |
invokeMethod(String name,
Object args)
|
boolean |
isIsJXRReportEnabled()
|
boolean |
isMIsCurrentClassReportOpened()
|
void |
logError(String message)
|
void |
logError(String message,
Throwable e)
|
void |
observeClass(edu.umd.cs.findbugs.classfile.ClassDescriptor clazz)
Observe a class. |
protected void |
openClassReportSection()
Initialised a bug report section in the report for a particular class. |
protected void |
printBug(edu.umd.cs.findbugs.BugInstance bugInstance)
Print the bug collection to a line in the table |
protected void |
printFilesSummary()
Print the File Summary Section. |
protected void |
printFilesSummaryLine(int classBugs)
|
protected void |
printSummary()
Print the Summary Section. |
void |
reportAnalysisError(edu.umd.cs.findbugs.AnalysisError analysisError)
Report a queued error. |
void |
reportMissingClass(edu.umd.cs.findbugs.classfile.ClassDescriptor classDescriptor)
|
void |
reportMissingClass(ClassNotFoundException ex)
|
void |
reportMissingClass(String missingClass)
Report a missing class. |
void |
setBugCollection(edu.umd.cs.findbugs.SortedBugCollection value)
|
void |
setBugCount(int value)
|
void |
setBundle(ResourceBundle value)
|
void |
setCurrentClassName(String value)
|
void |
setEffort(EffortParameter value)
|
void |
setErrorCount(int value)
|
void |
setFileCount(int value)
|
void |
setIsJXRReportEnabled(boolean value)
|
void |
setMavenLog(org.apache.maven.plugin.logging.Log value)
|
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
void |
setMIsCurrentClassReportOpened(boolean value)
|
void |
setMissingClassCount(int value)
|
void |
setMissingClassSet(Set value)
|
void |
setProperty(String name,
Object value)
|
void |
setSink(org.apache.maven.doxia.sink.Sink value)
|
void |
setThreshold(ThresholdParameter value)
|
protected String |
valueForLine(edu.umd.cs.findbugs.SourceLineAnnotation line)
Return the value to display. |
Methods inherited from class edu.umd.cs.findbugs.TextUIBugReporter |
---|
checkBugInstance, emitLine, getUseLongBugCodes, reportQueuedErrors, setOutputStream, setReportHistory, setReportStackTrace, setReportUserDesignations, setUseLongBugCodes |
Methods inherited from class edu.umd.cs.findbugs.AbstractBugReporter |
---|
addObserver, getMissingClassName, getProjectStats, notifyObservers, reportBug, reportBugsFromXml, reportSkippedAnalysis, setErrorVerbosity, setPriorityThreshold |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reporter(org.apache.maven.doxia.sink.Sink sink, ResourceBundle bundle, org.apache.maven.plugin.logging.Log log, ThresholdParameter threshold, boolean isJXRReportEnabled, EffortParameter effort)
sink
- The sink to generate the report.bundle
- The resource bundle to get the messages from.log
- The logger.threshold
- The threshold for the report.isJXRReportEnabled
- Is the jxr report plugin enabled.effort
- The used effort.Method Detail |
---|
public static final String getNOLINE_KEY()
public static final String getCOLUMN_LINE_KEY()
public static final String getCOLUMN_BUG_KEY()
public static final String getCOLUMN_BUGS_KEY()
public static final String getCOLUMN_CATEGORY_KEY()
public static final String getCOLUMN_DETAILS_KEY()
public static final String getREPORT_TITLE_KEY()
public static final String getLINKTITLE_KEY()
public static final String getLINK_KEY()
public static final String getNAME_KEY()
public static final String getFILES_KEY()
public static final String getTHRESHOLD_KEY()
public static final String getURL_SEPARATOR()
public static final String getJXR_PATHPREFIX_KEY()
public static final String getEFFORT_KEY()
public static final String getDETAILSLINK_KEY()
public static final String getVERSIONTITLE_KEY()
public static final String getSUMMARY_KEY()
public static final String getCOLUMN_CLASS_KEY()
public static final String getCOLUMN_CLASSES_KEY()
public static final String getCOLUMN_ERRORS_KEY()
public static final String getCOLUMN_FILES_KEY()
public static final String getCOLUMN_MISSINGCLASSES_KEY()
public org.apache.maven.doxia.sink.Sink getSink()
public void setSink(org.apache.maven.doxia.sink.Sink value)
public ResourceBundle getBundle()
public void setBundle(ResourceBundle value)
public org.apache.maven.plugin.logging.Log getMavenLog()
public void setMavenLog(org.apache.maven.plugin.logging.Log value)
public ThresholdParameter getThreshold()
public void setThreshold(ThresholdParameter value)
public EffortParameter getEffort()
public void setEffort(EffortParameter value)
public String getCurrentClassName()
public void setCurrentClassName(String value)
public boolean getMIsCurrentClassReportOpened()
public boolean isMIsCurrentClassReportOpened()
public void setMIsCurrentClassReportOpened(boolean value)
public boolean getIsJXRReportEnabled()
public boolean isIsJXRReportEnabled()
public void setIsJXRReportEnabled(boolean value)
public edu.umd.cs.findbugs.SortedBugCollection getBugCollection()
public void setBugCollection(edu.umd.cs.findbugs.SortedBugCollection value)
public int getBugCount()
public void setBugCount(int value)
public int getMissingClassCount()
public void setMissingClassCount(int value)
public int getFileCount()
public void setFileCount(int value)
public Set getMissingClassSet()
public void setMissingClassSet(Set value)
public int getErrorCount()
public void setErrorCount(int value)
public void finish()
BugReporter.finish()
public edu.umd.cs.findbugs.BugReporter getRealBugReporter()
getRealBugReporter
in interface edu.umd.cs.findbugs.BugReporter
getRealBugReporter
in class edu.umd.cs.findbugs.TextUIBugReporter
BugReporter.getRealBugReporter()
public void observeClass(edu.umd.cs.findbugs.classfile.ClassDescriptor clazz)
clazz
- the class#observeClass(edu.umd.cs.findbugs.classfile.ClassDescriptor)
public void reportAnalysisError(edu.umd.cs.findbugs.AnalysisError analysisError)
reportAnalysisError
in class edu.umd.cs.findbugs.TextUIBugReporter
analysisError
- the queued error#reportAnalysisError(edu.umd.cs.findbugs.AnalysisError)
public void logError(String message)
logError
in interface edu.umd.cs.findbugs.classfile.IErrorLogger
logError
in class edu.umd.cs.findbugs.AbstractBugReporter
public void logError(String message, Throwable e)
logError
in interface edu.umd.cs.findbugs.classfile.IErrorLogger
logError
in class edu.umd.cs.findbugs.AbstractBugReporter
public void reportMissingClass(String missingClass)
reportMissingClass
in class edu.umd.cs.findbugs.TextUIBugReporter
missingClass
- the name of the class#reportMissingClass(java.lang.String)
public void reportMissingClass(ClassNotFoundException ex)
reportMissingClass
in interface edu.umd.cs.findbugs.classfile.IErrorLogger
reportMissingClass
in class edu.umd.cs.findbugs.AbstractBugReporter
public void reportMissingClass(edu.umd.cs.findbugs.classfile.ClassDescriptor classDescriptor)
reportMissingClass
in interface edu.umd.cs.findbugs.classfile.IErrorLogger
reportMissingClass
in class edu.umd.cs.findbugs.AbstractBugReporter
protected void printBug(edu.umd.cs.findbugs.BugInstance bugInstance)
printBug
in class edu.umd.cs.findbugs.TextUIBugReporter
bugInstance
- the bug to printprotected String assembleJXRHyperlink(edu.umd.cs.findbugs.SourceLineAnnotation line, String lineNumber)
line
- The line number object with the bug.lineNumber
- The line number to show in the hyperlink.
protected void closeClassReportSection()
protected void doReportBug(edu.umd.cs.findbugs.BugInstance bugInstance)
doReportBug
in class edu.umd.cs.findbugs.AbstractBugReporter
bugInstance
- The bug to report#doReportBug(edu.umd.cs.findbugs.BugInstance)
protected String getReportTitle()
protected void openClassReportSection()
protected String valueForLine(edu.umd.cs.findbugs.SourceLineAnnotation line)
line
- The line to get the value from.
protected void printSummary()
protected void printFilesSummary()
protected void printFilesSummaryLine(int classBugs)
public groovy.lang.MetaClass getMetaClass()
public void setMetaClass(groovy.lang.MetaClass metaClass)
public Object invokeMethod(String name, Object args)
public Object getProperty(String name)
public void setProperty(String name, Object value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |