Class ErrorSuppressingDiagnosticListener

  • All Implemented Interfaces:

    public class ErrorSuppressingDiagnosticListener
    extends Object
    implements DiagnosticListener<JavaFileObject>
    When running the compiler with some dependencies missing (as when generating ABIs from source), by default it will abort after the last round of annotation processing because it believes there are missing types. This diagnostic listener tricks the compiler into ignoring those errors (which it marks as "recoverable") so that the compiler will keep going and run one more enter phase after annotation processing. We must be careful to not allow it to run further, because the analyze phase will not be happy to have missing types.