public class BindingBuilder<T> extends AbstractBindingBuilder<T> implements AnnotatedBindingBuilder<T>
ANNOTATION_ALREADY_SPECIFIED, binder, BINDING_TO_NULL, CONSTANT_VALUE_ALREADY_SET, elements, IMPLEMENTATION_ALREADY_SET, NULL_KEY, position, SCOPE_ALREADY_SET, SINGLE_INSTANCE_AND_SCOPE
Constructor and Description |
---|
BindingBuilder(Binder binder,
List<Element> elements,
Object source,
Key<T> key) |
Modifier and Type | Method and Description |
---|---|
BindingBuilder<T> |
annotatedWith(Annotation annotation)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
annotatedWith(Class<? extends Annotation> annotationType)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
to(Class<? extends T> implementation)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
to(Key<? extends T> linkedKey)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
to(TypeLiteral<? extends T> implementation)
See the EDSL examples at
Binder . |
<S extends T> |
toConstructor(Constructor<S> constructor)
See the EDSL examples at
Binder . |
<S extends T> |
toConstructor(Constructor<S> constructor,
TypeLiteral<? extends S> type)
See the EDSL examples at
Binder . |
void |
toInstance(T instance)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
toProvider(Class<? extends javax.inject.Provider<? extends T>> providerType)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
toProvider(Key<? extends javax.inject.Provider<? extends T>> providerKey)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
toProvider(Provider<? extends T> provider)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
toProvider(javax.inject.Provider<? extends T> provider)
See the EDSL examples at
Binder . |
BindingBuilder<T> |
toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType)
See the EDSL examples at
Binder . |
String |
toString() |
annotatedWithInternal, annotatedWithInternal, asEagerSingleton, checkNotAnnotated, checkNotScoped, checkNotTargetted, getBinding, in, in, keyTypeIsSet, setBinding
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asEagerSingleton, in, in
public BindingBuilder<T> annotatedWith(Class<? extends Annotation> annotationType)
AnnotatedBindingBuilder
Binder
.annotatedWith
in interface AnnotatedBindingBuilder<T>
public BindingBuilder<T> annotatedWith(Annotation annotation)
AnnotatedBindingBuilder
Binder
.annotatedWith
in interface AnnotatedBindingBuilder<T>
public BindingBuilder<T> to(Class<? extends T> implementation)
LinkedBindingBuilder
Binder
.to
in interface LinkedBindingBuilder<T>
public BindingBuilder<T> to(TypeLiteral<? extends T> implementation)
LinkedBindingBuilder
Binder
.to
in interface LinkedBindingBuilder<T>
public BindingBuilder<T> to(Key<? extends T> linkedKey)
LinkedBindingBuilder
Binder
.to
in interface LinkedBindingBuilder<T>
public void toInstance(T instance)
LinkedBindingBuilder
Binder
.toInstance
in interface LinkedBindingBuilder<T>
Injector.injectMembers(java.lang.Object)
public BindingBuilder<T> toProvider(Provider<? extends T> provider)
LinkedBindingBuilder
Binder
.toProvider
in interface LinkedBindingBuilder<T>
Injector.injectMembers(java.lang.Object)
public BindingBuilder<T> toProvider(javax.inject.Provider<? extends T> provider)
LinkedBindingBuilder
Binder
.toProvider
in interface LinkedBindingBuilder<T>
Injector.injectMembers(java.lang.Object)
public BindingBuilder<T> toProvider(Class<? extends javax.inject.Provider<? extends T>> providerType)
LinkedBindingBuilder
Binder
.toProvider
in interface LinkedBindingBuilder<T>
public BindingBuilder<T> toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType)
LinkedBindingBuilder
Binder
.toProvider
in interface LinkedBindingBuilder<T>
public BindingBuilder<T> toProvider(Key<? extends javax.inject.Provider<? extends T>> providerKey)
LinkedBindingBuilder
Binder
.toProvider
in interface LinkedBindingBuilder<T>
public <S extends T> ScopedBindingBuilder toConstructor(Constructor<S> constructor)
LinkedBindingBuilder
Binder
.toConstructor
in interface LinkedBindingBuilder<T>
public <S extends T> ScopedBindingBuilder toConstructor(Constructor<S> constructor, TypeLiteral<? extends S> type)
LinkedBindingBuilder
Binder
.toConstructor
in interface LinkedBindingBuilder<T>
Copyright © 2006-2015 Google, Inc.. All Rights Reserved.