The elements of a module can be inspected, validated and rewritten. Use Elements. to read the elements
from a module, and Elements. to rewrite them.
This can be used for static analysis and generation of Guice modules.
The elements of an injector can be inspected and exercised. Use Injector. to reflect on Guice injectors.
| Modifier and Type | Method and Description |
|---|---|
| public <T> T | |
| public void | |
| public Object | getSource()
Returns an arbitrary object containing information about the "place" where this element was configured. |
| acceptVisitor | back to summary |
|---|---|
| public <T> T acceptVisitor(ElementVisitor<T> visitor) Accepts an element visitor. Invokes the visitor method specific to this element's type.
| |
| applyTo | back to summary |
|---|---|
| public void applyTo(Binder binder) Writes this module element to the given binder (optional operation).
| |
| getSource | back to summary |
|---|---|
| public Object getSource() Returns an arbitrary object containing information about the "place" where this element was configured. Used by Guice in the production of descriptive error messages. Tools might specially handle types they know about; | |