public interface Binder
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)
.Modifier and Type | Method and Description |
---|---|
<T> BindingBuilder<T> |
bind(Class<T> interfaceType)
Starts an unnamed binding of a specific interface.
|
<T> BindingBuilder<T> |
bind(Key<T> key)
Starts a binding of a specific interface based on a provided binding key.
|
<T> ListBuilder<T> |
bindList(String bindingName)
Starts a binding of a java.util.List> distinguished by its binding name.
|
<T> MapBuilder<T> |
bindMap(String bindingName)
Starts a binding of a java.util.Map
|
<T> BindingBuilder<T> bind(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(String bindingName)
<T> ListBuilder<T> bindList(String bindingName)
Copyright © 2001–2018 Apache Cayenne. All rights reserved.