Package dagger.spi.model
Interface BindingGraphPlugin
public interface BindingGraphPlugin
A pluggable visitor for
BindingGraph
.
Note: This is still experimental and will change.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
init
(DaggerProcessingEnv processingEnv, Map<String, String> options) Initializes this plugin with aDaggerProcessingEnv
.default void
Perform any extra work after the plugin finished all its visiting.default void
Runs before each round of Dagger annotation processing.default String
A distinguishing name of the plugin that will be used in diagnostics printed to the messager.Returns the annotation-processing options that this plugin uses to configure behavior.void
visitGraph
(BindingGraph bindingGraph, DiagnosticReporter diagnosticReporter) Called once for each valid root binding graph encountered by the Dagger processor.
-
Method Details
-
visitGraph
Called once for each valid root binding graph encountered by the Dagger processor. May report diagnostics usingdiagnosticReporter
. -
init
Initializes this plugin with aDaggerProcessingEnv
.This will be called once per instance of this plugin, before any graph is visited.
-
supportedOptions
Returns the annotation-processing options that this plugin uses to configure behavior.- See Also:
-
pluginName
A distinguishing name of the plugin that will be used in diagnostics printed to the messager. By default, the fully qualified name of the plugin is used. -
onProcessingRoundBegin
default void onProcessingRoundBegin()Runs before each round of Dagger annotation processing.If using the plugin to process elements that need resetting at the beginning of each processing round, use this function to perform the setup.
-
onPluginEnd
default void onPluginEnd()Perform any extra work after the plugin finished all its visiting. This will be called once per instance of this plugin, after all graphs were visited
-