| Constructor and Description |
|---|
AbstractModule() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> Binder.QualifiedBindingBuilder<T> |
bind(java.lang.Class<T> keyType) |
protected <T> Binder.QualifiedBindingBuilder<T> |
bind(TypeReference<T> keyType) |
protected Binder |
binder()
The binder field isn't used directly because we need to
check if the binder is present, throwing the correct exception
instead of a simple and not descriptive null pointer exception
|
protected void |
configure() |
void |
configure(Binder binder)
Configures all bindings on the specified
binder. |
protected void |
install(java.lang.Iterable<? extends Module> modules) |
protected void |
install(Module... modules) |
protected <T> Binder.MultiBindingBuilder<T> |
multibind(java.lang.Class<T> keyType) |
protected <T> Binder.MultiBindingBuilder<T> |
multibind(TypeReference<T> keyType) |
public final void configure(Binder binder)
Modulebinder. This method
is called before checking for methods annotated with @Provides
to create method-based providers.
Don't invoke this method to configure binders. Instead use Binder.install(team.unnamed.inject.Module...)
to check all the methods annotated with @Provides
protected final Binder binder()
protected final <T> Binder.QualifiedBindingBuilder<T> bind(java.lang.Class<T> keyType)
protected final <T> Binder.QualifiedBindingBuilder<T> bind(TypeReference<T> keyType)
protected final <T> Binder.MultiBindingBuilder<T> multibind(java.lang.Class<T> keyType)
protected final <T> Binder.MultiBindingBuilder<T> multibind(TypeReference<T> keyType)
protected final void install(Module... modules)
protected final void install(java.lang.Iterable<? extends Module> modules)
protected void configure()