|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Binder
An object passed to a Module
by the DI container during initialization, that
provides the API for the module to bind its services to the container. Note that the
default Scope
of the bound objects is normally "singleton" and can be changed
to "no scope" or a custom scope via a corresponding method of a binding builder. E.g.
see BindingBuilder.in(Scope)
.
Method Summary | ||
---|---|---|
|
bind(java.lang.Class<T> interfaceType)
Starts an unnamed binding of a specific interface. |
|
|
bind(Key<T> key)
Starts a binding of a specific interface based on a provided binding key. |
|
|
bindList(java.lang.String bindingName)
Starts a binding of a java.util.List> distinguished by its binding name. |
|
|
bindMap(java.lang.String bindingName)
Starts a binding of a java.util.Map |
Method Detail |
---|
<T> BindingBuilder<T> bind(java.lang.Class<T> interfaceType)
<T> BindingBuilder<T> bind(Key<T> key)
bind(Class)
and allows to create named
bindings in addition to default ones. Binding should continue using returned
BindingBuilder.
<T> MapBuilder<T> bindMap(java.lang.String bindingName)
<T> ListBuilder<T> bindList(java.lang.String bindingName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |