Class BugReportDispatcher

    • Constructor Detail

      • BugReportDispatcher

        public BugReportDispatcher​(java.util.Collection<TextUIBugReporter> reporters)
    • 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
      • 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.
        Specified by:
        finish in interface BugReporter
      • 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
      • reportBug

        public 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
      • reportMissingClass

        public void reportMissingClass​(java.lang.ClassNotFoundException ex)
        Description copied from interface: IErrorLogger
        Called to report a class lookup failure.
        Specified by:
        reportMissingClass in interface IErrorLogger
        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
        Parameters:
        classDescriptor - ClassDescriptor of a missing class
      • logError

        public void logError​(java.lang.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
      • logError

        public void logError​(java.lang.String message,
                             java.lang.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
      • forEach

        private void forEach​(java.util.function.Consumer<TextUIBugReporter> consumer)
        Consume each reporter one by one, and throw an exception if some of them.
        Parameters:
        consumer - Operation to handle each reporter.