Package dagger.spi
Interface BindingGraphPlugin
-
public interface BindingGraphPluginA pluggable visitor forBindingGraph.Note: This is still experimental and will change.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidinitElements(javax.lang.model.util.Elements elements)Initializes this plugin with aElementsinstance.default voidinitFiler(javax.annotation.processing.Filer filer)Initializes this plugin with aFilerthat it can use to write Java or other files based on the binding graph.default voidinitOptions(java.util.Map<java.lang.String,java.lang.String> options)Initializes this plugin with a filtered view of the options passed on thejavaccommand-line for all keys fromsupportedOptions().default voidinitTypes(javax.lang.model.util.Types types)Initializes this plugin with aTypesinstance.default voidonPluginEnd()Perform any extra work after the plugin finished all its visiting.default java.lang.StringpluginName()A distinguishing name of the plugin that will be used in diagnostics printed to theMessager.default java.util.Set<java.lang.String>supportedOptions()Returns the annotation-processing options that this plugin uses to configure behavior.voidvisitGraph(BindingGraph bindingGraph, DiagnosticReporter diagnosticReporter)Called once for each valid root binding graph encountered by the Dagger processor.
-
-
-
Method Detail
-
visitGraph
void visitGraph(BindingGraph bindingGraph, DiagnosticReporter diagnosticReporter)
Called once for each valid root binding graph encountered by the Dagger processor. May report diagnostics usingdiagnosticReporter.
-
initFiler
default void initFiler(javax.annotation.processing.Filer filer)
Initializes this plugin with aFilerthat it can use to write Java or other files based on the binding graph. This will be called once per instance of this plugin, before any graph is visited.- See Also:
ProcessingEnvironment.getFiler()
-
initTypes
default void initTypes(javax.lang.model.util.Types types)
Initializes this plugin with aTypesinstance. This will be called once per instance of this plugin, before any graph is visited.- See Also:
ProcessingEnvironment.getTypeUtils()
-
initElements
default void initElements(javax.lang.model.util.Elements elements)
Initializes this plugin with aElementsinstance. This will be called once per instance of this plugin, before any graph is visited.- See Also:
ProcessingEnvironment.getElementUtils()
-
initOptions
default void initOptions(java.util.Map<java.lang.String,java.lang.String> options)
Initializes this plugin with a filtered view of the options passed on thejavaccommand-line for all keys fromsupportedOptions(). This will be called once per instance of this plugin, before any graph is visited.- See Also:
ProcessingEnvironment.getOptions()
-
supportedOptions
default java.util.Set<java.lang.String> supportedOptions()
Returns the annotation-processing options that this plugin uses to configure behavior.- See Also:
Processor.getSupportedOptions()
-
pluginName
default java.lang.String pluginName()
A distinguishing name of the plugin that will be used in diagnostics printed to theMessager. By default, the fully qualified name of the plugin is used.
-
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
-
-