public interface Binder extends ErrorAttachable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Binder.CollectionMultiBindingBuilder<T>
Represents a binding builder for collections,
it can be linked and scoped, it's qualified
using
Binder.MultiBindingBuilder |
static interface |
Binder.KeyBinder<K,V>
Represents a map key that's being bound
to a value.
|
static interface |
Binder.Linked<R,T>
Represents a binding builder that can be
linked to another key (or the same key)
|
static interface |
Binder.MapMultiBindingBuilder<K,V>
Represents a binding builder for maps,
binds using a key and a value.
|
static interface |
Binder.MultiBindingBuilder<T>
Represents a binding builder for collections,
it can be qualified.
|
static interface |
Binder.Qualified<R>
Represents a binding builder that can be
qualified, for example with an annotation,
an annotation type, etc.
|
static interface |
Binder.QualifiedBindingBuilder<T>
Represents a binding builder that can be qualified,
linked and scoped.
|
static interface |
Binder.Scoped
Represents a binding builder that can be
scoped.
|
| Modifier and Type | Method and Description |
|---|---|
void |
$unsafeBind(Key<?> key,
Provider<?> provider)
Deprecated.
Unsafe operation, the method is here
to avoid the usage of raw-types in some cases.
If you misuse it, everything will end up bugged.
The method directly puts the key with the specified provider to the map, it's not checked so it's unsafe. |
default <T> Binder.QualifiedBindingBuilder<T> |
bind(java.lang.Class<T> keyType) |
<T> Binder.QualifiedBindingBuilder<T> |
bind(TypeReference<T> keyType) |
void |
install(java.lang.Iterable<? extends Module> modules) |
default void |
install(Module... modules) |
default <T> Binder.MultiBindingBuilder<T> |
multibind(java.lang.Class<T> keyType) |
<T> Binder.MultiBindingBuilder<T> |
multibind(TypeReference<T> keyType) |
applySnapshot, attach, attach, attachAll, errorCount, formatMessages, getErrorMessages, hasErrors, reportAttachedErrors@Deprecated void $unsafeBind(Key<?> key, Provider<?> provider)
The method directly puts the key with the specified provider to the map, it's not checked so it's unsafe.
key - The key to bindprovider - The provider to binddefault <T> Binder.QualifiedBindingBuilder<T> bind(java.lang.Class<T> keyType)
<T> Binder.QualifiedBindingBuilder<T> bind(TypeReference<T> keyType)
default <T> Binder.MultiBindingBuilder<T> multibind(java.lang.Class<T> keyType)
<T> Binder.MultiBindingBuilder<T> multibind(TypeReference<T> keyType)
default void install(Module... modules)
void install(java.lang.Iterable<? extends Module> modules)