Class TracingDiagnosticListener<S extends JavaFileObject>

java.lang.Object
io.github.ascopes.jct.diagnostics.TracingDiagnosticListener<S>
Type Parameters:
S - the file type.
All Implemented Interfaces:
DiagnosticListener<S>

public class TracingDiagnosticListener<S extends JavaFileObject> extends Object implements DiagnosticListener<S>
A diagnostics listener that wraps all diagnostics in additional invocation information, and then stores them in a queue for processing later.
Since:
0.0.1
Author:
Ashley Scopes
  • Constructor Details

    • TracingDiagnosticListener

      public TracingDiagnosticListener(boolean logging, boolean stackTraces)
      Initialize this listener.
      Parameters:
      logging - true if logging is enabled, false otherwise.
      stackTraces - true if logging stack traces is enabled, false otherwise. This is ignored if logging is false.
    • TracingDiagnosticListener

      @VisibleForTestingOnly protected TracingDiagnosticListener(Logger logger, Supplier<? extends Thread> threadGetter, boolean logging, boolean stackTraces)
      Only visible for testing.

      Users should NOT use this constructor. It may be changed or removed without notice.

      Parameters:
      logger - the logger to use.
      threadGetter - the supplier of the current thread.
      logging - whether to enable logging.
      stackTraces - whether to enable stack traces in the logging.
  • Method Details