|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.inject.ContainerBuilder.BindingBuilder<T>
public class ContainerBuilder.BindingBuilder<T>
Binds a Key
to an implementation in a given scope.
Method Summary | ||
---|---|---|
ContainerBuilder.BindingBuilder<T> |
from(java.lang.Object source)
Sets the source object. |
|
ContainerBuilder.BindingBuilder<T> |
in(Scope scope)
Specifies the scope. |
|
ContainerBuilder.BindingBuilder<T> |
named(java.lang.String name)
Sets the name of this binding. |
|
|
to(java.lang.Class<I> implementation)
Binds to instances of the given implementation class. |
|
ContainerBuilder.BindingBuilder<T> |
to(ContextualFactory<? extends T> factory)
Binds to instances from the given factory. |
|
ContainerBuilder.BindingBuilder<T> |
to(Factory<? extends T> factory)
Binds to instances from the given factory. |
|
|
to(TypeToken<I> implementation)
Binds to instances of the given implementation type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ContainerBuilder.BindingBuilder<T> from(java.lang.Object source)
public ContainerBuilder.BindingBuilder<T> named(java.lang.String name)
public <I extends T> ContainerBuilder.BindingBuilder<T> to(java.lang.Class<I> implementation)
Container
will inject the implementation instances as well. Sets the
scope based on the @Scoped
annotation on the implementation
class if present.
public <I extends T> ContainerBuilder.BindingBuilder<T> to(TypeToken<I> implementation)
Container
will inject the implementation instances as well. Sets the
scope based on the @Scoped
annotation on the implementation
class if present.
public ContainerBuilder.BindingBuilder<T> to(ContextualFactory<? extends T> factory)
public ContainerBuilder.BindingBuilder<T> to(Factory<? extends T> factory)
public ContainerBuilder.BindingBuilder<T> in(Scope scope)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |