Class XDocsBugReporter

All Implemented Interfaces:
RepositoryLookupFailureCallback, BugReporter, IClassObserver, IErrorLogger

public class XDocsBugReporter extends TextUIBugReporter
BugReporter to output warnings in xdocs format for Maven.
Author:
Garvin LeClaire
  • Constructor Details

    • XDocsBugReporter

      public XDocsBugReporter(Project project)
  • Method Details

    • observeClass

      public void observeClass(ClassDescriptor classDescriptor)
      Description copied from interface: IClassObserver
      Observe a class being visited.
      Parameters:
      classDescriptor - class being visited
    • logError

      public void logError(String message)
      Description copied from interface: IErrorLogger
      Log an error that occurs while performing analysis.
      Specified by:
      logError in interface IErrorLogger
      Overrides:
      logError in class AbstractBugReporter
      Parameters:
      message - the error message
    • reportMissingClass

      public void reportMissingClass(ClassNotFoundException ex)
      Description copied from interface: IErrorLogger
      Called to report a class lookup failure.
      Specified by:
      reportMissingClass in interface IErrorLogger
      Overrides:
      reportMissingClass in class AbstractBugReporter
      Parameters:
      ex - a ClassNotFoundException resulting from the class lookup failure
    • reportMissingClass

      public void reportMissingClass(ClassDescriptor classDescriptor)
      Description copied from interface: IErrorLogger
      Called to report a class lookup failure.
      Specified by:
      reportMissingClass in interface IErrorLogger
      Overrides:
      reportMissingClass in class AbstractBugReporter
      Parameters:
      classDescriptor - ClassDescriptor of a missing class
    • doReportBug

      public void doReportBug(BugInstance bugInstance)
      Description copied from class: AbstractBugReporter
      Subclasses must override this. It will be called only for bugs which meet the priority threshold.
      Specified by:
      doReportBug in class AbstractBugReporter
      Parameters:
      bugInstance - the bug to report
    • printBug

      protected void printBug(BugInstance bugInstance)
      Description copied from class: TextUIBugReporter
      Print bug in one-line format.
      Overrides:
      printBug in class TextUIBugReporter
      Parameters:
      bugInstance - the bug to print
    • finish

      public void finish()
      Description copied from interface: BugReporter
      Finish reporting bugs. If any bug reports have been queued, calling this method will flush them.
    • toElement

      public void toElement(BugInstance bugInstance)
    • getBugCollection

      @Nonnull public BugCollection getBugCollection()
      Description copied from interface: BugReporter
      Get the bug collection (if any) associated with this bug reporter
    • setRankThreshold

      void setRankThreshold(int threshold)