edu.umd.cs.findbugs

Class AbstractBugReporter

    • Constructor Detail

      • AbstractBugReporter

        public AbstractBugReporter()
    • Method Detail

      • setErrorVerbosity

        public void setErrorVerbosity(int level)
        Description copied from interface: BugReporter
        Set the error-reporting verbosity level.
        Specified by:
        setErrorVerbosity in interface BugReporter
        Parameters:
        level - the verbosity level
      • setPriorityThreshold

        public void setPriorityThreshold(int threshold)
        Description copied from interface: BugReporter
        Set the priority threshold.
        Specified by:
        setPriorityThreshold in interface BugReporter
        Parameters:
        threshold - bug instances must be at least as important as this priority to be reported
      • setRankThreshold

        public void setRankThreshold(int threshold)
      • setIsRelaxed

        public void setIsRelaxed(boolean relaxed)
      • isRelaxed

        protected boolean isRelaxed()
      • reportBug

        public final void reportBug(@Nonnull
                     BugInstance bugInstance)
        Description copied from interface: BugReporter
        Report a bug. The implementation may report the bug immediately, or queue it for later.
        Specified by:
        reportBug in interface BugReporter
        Parameters:
        bugInstance - object describing the bug instance
      • isValidMissingClassMessage

        protected static final boolean isValidMissingClassMessage(String message)
      • reportMissingClass

        public void reportMissingClass(ClassDescriptor classDescriptor)
        Description copied from interface: IErrorLogger
        Called to report a class lookup failure.
        Specified by:
        reportMissingClass in interface IErrorLogger
        Parameters:
        classDescriptor - ClassDescriptor of a missing class
      • 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
        Parameters:
        message - the error message
      • getMissingClasses

        protected Set<String> getMissingClasses()
        Returns:
        the set with all missing classes reported so far
      • logError

        public void logError(String message,
                    Throwable e)
        Description copied from interface: IErrorLogger
        Log an error that occurs while performing analysis.
        Specified by:
        logError in interface IErrorLogger
        Parameters:
        message - the error message
        e - the exception which is the underlying cause of the error
      • reportQueuedErrors

        public void reportQueuedErrors()
        Description copied from interface: BugReporter
        Report any accumulated error messages.
        Specified by:
        reportQueuedErrors in interface BugReporter
      • getProjectStats

        public ProjectStats getProjectStats()
        Description copied from interface: BugReporter
        Get ProjectStats object used to store statistics about the overall project being analyzed.
        Specified by:
        getProjectStats in interface BugReporter
      • notifyObservers

        protected void notifyObservers(BugInstance bugInstance)
        This should be called when a bug is reported by a subclass.
        Parameters:
        bugInstance - the bug to inform observers of
      • doReportBug

        protected abstract void doReportBug(BugInstance bugInstance)
        Subclasses must override this. It will be called only for bugs which meet the priority threshold.
        Parameters:
        bugInstance - the bug to report
      • reportAnalysisError

        public abstract void reportAnalysisError(AnalysisError error)
        Report a queued error.
        Parameters:
        error - the queued error
      • reportMissingClass

        public abstract void reportMissingClass(String string)
        Report a missing class.
        Parameters:
        string - the name of the class

Copyright © 2003–2015. All rights reserved.