use of dagger.spi.DiagnosticReporter in project DaggerCodeParse-2.38.1base by hellogaod.
the class ExternalBindingGraphPlugins method visit.
/**
* Returns {@code false} if any of the plugins reported an error.
*/
boolean visit(dagger.spi.model.BindingGraph spiGraph) {
BindingGraph graph = ExternalBindingGraphConverter.fromSpiModel(spiGraph);
boolean isClean = true;
for (BindingGraphPlugin plugin : plugins) {
DiagnosticReporterFactory.DiagnosticReporterImpl spiReporter = diagnosticReporterFactory.reporter(spiGraph, plugin.pluginName(), /* reportErrorsAsWarnings= */
false);
DiagnosticReporter reporter = ExternalBindingGraphConverter.fromSpiModel(spiReporter);
plugin.visitGraph(graph, reporter);
if (spiReporter.reportedDiagnosticKinds().contains(ERROR)) {
isClean = false;
}
}
return isClean;
}
Aggregations