com.google.inject.binder
Interface LinkedBindingBuilder<T>

All Superinterfaces:
ScopedBindingBuilder
All Known Subinterfaces:
AnnotatedBindingBuilder<T>

public interface LinkedBindingBuilder<T>
extends ScopedBindingBuilder

Links a binding to another binding or an instance.

Author:
crazybob@google.com (Bob Lee)

Method Summary
 ScopedBindingBuilder to(java.lang.Class<? extends T> implementation)
          Binds to another binding with the specified type.
 ScopedBindingBuilder to(Key<? extends T> targetKey)
          Binds to another binding with the specified key.
 ScopedBindingBuilder to(TypeLiteral<? extends T> implementation)
          Binds to another binding with the specified type.
 void toInstance(T instance)
          Binds to the given instance.
 ScopedBindingBuilder toProvider(java.lang.Class<? extends Provider<? extends T>> providerType)
          Binds to instances from the provider bound to the given provider type.
 ScopedBindingBuilder toProvider(Key<? extends Provider<? extends T>> providerKey)
          Binds to instances from the provider bound to the given key.
 ScopedBindingBuilder toProvider(Provider<? extends T> provider)
          Binds to instances generated by the given Provider.
 
Methods inherited from interface com.google.inject.binder.ScopedBindingBuilder
asEagerSingleton, in, in
 

Method Detail

to

ScopedBindingBuilder to(java.lang.Class<? extends T> implementation)
Binds to another binding with the specified type.


to

ScopedBindingBuilder to(TypeLiteral<? extends T> implementation)
Binds to another binding with the specified type.


to

ScopedBindingBuilder to(Key<? extends T> targetKey)
Binds to another binding with the specified key.


toInstance

void toInstance(T instance)
Binds to the given instance. The Injector will automatically inject the members of this instance when it is first created. See Injector.injectMembers(Object).


toProvider

ScopedBindingBuilder toProvider(Provider<? extends T> provider)
Binds to instances generated by the given Provider. The Injector will automatically inject the members of this provider instance when it is first created. See Injector.injectMembers(Object).


toProvider

ScopedBindingBuilder toProvider(java.lang.Class<? extends Provider<? extends T>> providerType)
Binds to instances from the provider bound to the given provider type.


toProvider

ScopedBindingBuilder toProvider(Key<? extends Provider<? extends T>> providerKey)
Binds to instances from the provider bound to the given key.



Copyright © {inceptionYear}-2008 null. All Rights Reserved.