Class ErrorSuppressingDiagnosticListener
- java.lang.Object
-
- com.facebook.buck.jvm.java.abi.source.api.ErrorSuppressingDiagnosticListener
-
- All Implemented Interfaces:
DiagnosticListener<JavaFileObject>
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.
-
-
Constructor Summary
Constructors Constructor Description ErrorSuppressingDiagnosticListener(DiagnosticListener<? super JavaFileObject> inner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
report(Diagnostic<? extends JavaFileObject> diagnostic)
void
setTask(JavaCompiler.CompilationTask task)
-
-
-
Constructor Detail
-
ErrorSuppressingDiagnosticListener
public ErrorSuppressingDiagnosticListener(DiagnosticListener<? super JavaFileObject> inner)
-
-
Method Detail
-
setTask
public void setTask(JavaCompiler.CompilationTask task)
-
report
public void report(Diagnostic<? extends JavaFileObject> diagnostic)
- Specified by:
report
in interfaceDiagnosticListener<JavaFileObject>
-
-