public interface BindingGraphPlugin
BindingGraph
.
Note: This is still experimental and will change.
Modifier and Type | Method and Description |
---|---|
default void |
initElements(javax.lang.model.util.Elements elements)
Initializes this plugin with a
Elements instance. |
default void |
initFiler(javax.annotation.processing.Filer filer)
Initializes this plugin with a
Filer that it can use to write Java or other files based
on the binding graph. |
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 the
javac
command-line for all keys from supportedOptions() . |
default void |
initTypes(javax.lang.model.util.Types types)
Initializes this plugin with a
Types instance. |
default java.lang.String |
pluginName()
A distinguishing name of the plugin that will be used in diagnostics printed to the
Messager . |
default java.util.Set<java.lang.String> |
supportedOptions()
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.
|
void visitGraph(BindingGraph bindingGraph, DiagnosticReporter diagnosticReporter)
diagnosticReporter
.default void initFiler(javax.annotation.processing.Filer filer)
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.ProcessingEnvironment.getFiler()
default void initTypes(javax.lang.model.util.Types types)
Types
instance. This will be called once per instance of
this plugin, before any graph is visited.ProcessingEnvironment.getTypeUtils()
default void initElements(javax.lang.model.util.Elements elements)
Elements
instance. This will be called once per instance
of this plugin, before any graph is visited.ProcessingEnvironment.getElementUtils()
default void initOptions(java.util.Map<java.lang.String,java.lang.String> options)
javac
command-line for all keys from supportedOptions()
. This will be called once per
instance of this plugin, before any graph is visited.ProcessingEnvironment.getOptions()
default java.util.Set<java.lang.String> supportedOptions()
Processor.getSupportedOptions()
default java.lang.String pluginName()
Messager
. By default, the fully qualified name of the
plugin is used.