Interface Binder
- All Known Subinterfaces:
Context
-
Method Summary
Modifier and TypeMethodDescription<T> BindingBuilder<T> bind(TypeLiteral<T> typeLiteral) Creates a new fluentBindingBuilderfor the specifiedTypeLiteralofBinding, allowing definition, configuration and construction of aBindingkeyed by a fully-parameterized generic type (e.g.<T> BindingBuilder<T> Creates a new fluentBindingBuilderfor the specifiedClassofBinding, allowing definition, configuration and construction of aBinding.<T> MultiBinder<T> Returns aMultiBinderfor the specified element type, creating it if it does not yet exist.default Binderdefault Binder
-
Method Details
-
bind
Creates a new fluentBindingBuilderfor the specifiedClassofBinding, allowing definition, configuration and construction of aBinding.- Type Parameters:
T- the type ofBinding- Parameters:
bindingClass- theClassfor which to create aBinding- Returns:
- a new
BindingBuilder
-
bind
Creates a new fluentBindingBuilderfor the specifiedTypeLiteralofBinding, allowing definition, configuration and construction of aBindingkeyed by a fully-parameterized generic type (e.g.List<Person>) that a rawClasscannot express.- Type Parameters:
T- the type ofBinding- Parameters:
typeLiteral- theTypeLiteralfor which to create aBinding- Returns:
- a new
BindingBuilder
-
bindSet
Returns aMultiBinderfor the specified element type, creating it if it does not yet exist. Multiple calls for the same type (e.g. from two differentModules) accumulate into the same underlying set.- Type Parameters:
T- the element type- Parameters:
type- the elementClass- Returns:
- the
MultiBinderfor the element type
-
install
-
configure
-