Package dagger.spi

Interface BindingGraphPlugin


public interface BindingGraphPlugin
A pluggable visitor for BindingGraph.

Note: This is still experimental and will change.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Initializes this plugin with a Elements instance.
    default void
    Initializes this plugin with a Filer that it can use to write Java or other files based on the binding graph.
    default void
    Initializes this plugin with a filtered view of the options passed on the javac command-line for all keys from supportedOptions().
    default void
    Initializes this plugin with a Types instance.
    default void
    Perform any extra work after the plugin finished all its visiting.
    default String
    A distinguishing name of the plugin that will be used in diagnostics printed to the Messager.
    default Set<String>
    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

      void visitGraph(BindingGraph bindingGraph, DiagnosticReporter diagnosticReporter)
      Called once for each valid root binding graph encountered by the Dagger processor. May report diagnostics using diagnosticReporter.
    • initFiler

      default void initFiler(Filer filer)
      Initializes this plugin with a Filer that 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:
    • initTypes

      default void initTypes(Types types)
      Initializes this plugin with a Types instance. This will be called once per instance of this plugin, before any graph is visited.
      See Also:
    • initElements

      default void initElements(Elements elements)
      Initializes this plugin with a Elements instance. This will be called once per instance of this plugin, before any graph is visited.
      See Also:
    • initOptions

      default void initOptions(Map<String,String> options)
      Initializes this plugin with a filtered view of the options passed on the javac command-line for all keys from supportedOptions(). This will be called once per instance of this plugin, before any graph is visited.
      See Also:
    • supportedOptions

      default Set<String> supportedOptions()
      Returns the annotation-processing options that this plugin uses to configure behavior.
      See Also:
    • pluginName

      default String 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.
    • 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