Class XDocsBugReporter
java.lang.Object
edu.umd.cs.findbugs.AbstractBugReporter
edu.umd.cs.findbugs.TextUIBugReporter
edu.umd.cs.findbugs.XDocsBugReporter
- All Implemented Interfaces:
RepositoryLookupFailureCallback, BugReporter, IClassObserver, IErrorLogger, ConfigurableBugReporter
BugReporter to output warnings in xdocs format for Maven.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractBugReporter
AbstractBugReporter.Error -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final SortedBugCollectionprivate final org.dom4j.Documentprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final Projectprivate final org.dom4j.Elementprivate static final StringFields inherited from class TextUIBugReporter
OTHER_CATEGORY_ABBREV, outputStreamFields inherited from interface BugReporter
NORMAL, SILENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoReportBug(BugInstance bugInstance) Subclasses must override this.private org.dom4j.DocumentendDocument(Project project) voidfinish()Finish reporting bugs.Get the bug collection (if any) associated with this bug reportervoidLog an error that occurs while performing analysis.voidobserveClass(ClassDescriptor classDescriptor) Observe a class being visited.protected voidprintBug(BugInstance bugInstance) Print bug in one-line format.voidreportMissingClass(ClassDescriptor classDescriptor) Called to report a class lookup failure.voidCalled to report a class lookup failure.voidtoElement(BugInstance bugInstance) private voidprivate static StringMethods inherited from class TextUIBugReporter
checkBugInstance, emitLine, getOutputTarget, getRealBugReporter, getUseLongBugCodes, isApplySuppressions, isDuplicateOf, reportAnalysisError, reportMissingClass, reportQueuedErrors, setApplySuppressions, setOutputStream, setOutputTarget, setReportHistory, setReportStackTrace, setShowRank, setUseLongBugCodes, setWriterMethods inherited from class AbstractBugReporter
addObserver, getMissingClasses, getMissingClassName, getPriorityAdjuster, getProjectStats, getQueuedErrors, isRelaxed, isValidMissingClassMessage, logError, notifyObservers, reportBug, reportBugsFromXml, reportSkippedAnalysis, setErrorVerbosity, setIsRelaxed, setPriorityAdjuster, setPriorityThreshold, setRankThresholdMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BugReporter
addObserver, getPriorityAdjuster, getProjectStats, reportBug, setErrorVerbosity, setPriorityAdjuster, setPriorityThresholdMethods inherited from interface ConfigurableBugReporter
setRankThresholdMethods inherited from interface IErrorLogger
logError, reportMissingClass, reportSkippedAnalysis
-
Field Details
-
bugCollection
-
project
-
document
private final org.dom4j.Document document -
root
private final org.dom4j.Element root -
ROOT_ELEMENT_NAME
- See Also:
-
ERRORS_ELEMENT_NAME
- See Also:
-
ANALYSIS_ERROR_ELEMENT_NAME
- See Also:
-
MISSING_CLASS_ELEMENT_NAME
- See Also:
-
ELEMENT_NAME
- See Also:
-
FILE_ELEMENT_NAME
- See Also:
-
-
Constructor Details
-
XDocsBugReporter
-
-
Method Details
-
observeClass
Description copied from interface:IClassObserverObserve a class being visited.- Parameters:
classDescriptor- class being visited
-
logError
Description copied from interface:IErrorLoggerLog an error that occurs while performing analysis.- Specified by:
logErrorin interfaceIErrorLogger- Overrides:
logErrorin classAbstractBugReporter- Parameters:
message- the error message
-
reportMissingClass
Description copied from interface:IErrorLoggerCalled to report a class lookup failure.- Specified by:
reportMissingClassin interfaceIErrorLogger- Overrides:
reportMissingClassin classAbstractBugReporter- Parameters:
ex- a ClassNotFoundException resulting from the class lookup failure
-
reportMissingClass
Description copied from interface:IErrorLoggerCalled to report a class lookup failure.- Specified by:
reportMissingClassin interfaceIErrorLogger- Overrides:
reportMissingClassin classAbstractBugReporter- Parameters:
classDescriptor- ClassDescriptor of a missing class
-
doReportBug
Description copied from class:AbstractBugReporterSubclasses must override this. It will be called only for bugs which meet the priority threshold.- Specified by:
doReportBugin classAbstractBugReporter- Parameters:
bugInstance- the bug to report
-
printBug
Description copied from class:TextUIBugReporterPrint bug in one-line format.- Overrides:
printBugin classTextUIBugReporter- Parameters:
bugInstance- the bug to print
-
finish
public void finish()Description copied from interface:BugReporterFinish reporting bugs. If any bug reports have been queued, calling this method will flush them. -
writeXML
- Throws:
IOException
-
endDocument
-
xmlEscape
-
toElement
-
getBugCollection
Description copied from interface:BugReporterGet the bug collection (if any) associated with this bug reporter
-