org.elasticsearch.common.inject.internal
Class BindingBuilder<T>

java.lang.Object
  extended by org.elasticsearch.common.inject.internal.AbstractBindingBuilder<T>
      extended by org.elasticsearch.common.inject.internal.BindingBuilder<T>
All Implemented Interfaces:
AnnotatedBindingBuilder<T>, LinkedBindingBuilder<T>, ScopedBindingBuilder

public class BindingBuilder<T>
extends AbstractBindingBuilder<T>
implements AnnotatedBindingBuilder<T>

Bind a non-constant key.

Author:
jessewilson@google.com (Jesse Wilson)

Field Summary
 
Fields inherited from class org.elasticsearch.common.inject.internal.AbstractBindingBuilder
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 Summary
BindingBuilder(Binder binder, List<Element> elements, Object source, Key<T> key)
           
 
Method Summary
 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.
 void toInstance(T instance)
          See the EDSL examples at Binder.
 BindingBuilder<T> toProvider(Class<? extends Provider<? extends T>> providerType)
          See the EDSL examples at Binder.
 BindingBuilder<T> toProvider(Key<? extends Provider<? extends T>> providerKey)
          See the EDSL examples at Binder.
 BindingBuilder<T> toProvider(Provider<? extends T> provider)
          See the EDSL examples at Binder.
 String toString()
           
 
Methods inherited from class org.elasticsearch.common.inject.internal.AbstractBindingBuilder
annotatedWithInternal, annotatedWithInternal, asEagerSingleton, checkNotAnnotated, checkNotScoped, checkNotTargetted, getBinding, in, in, keyTypeIsSet, setBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.common.inject.binder.ScopedBindingBuilder
asEagerSingleton, in, in
 

Constructor Detail

BindingBuilder

public BindingBuilder(Binder binder,
                      List<Element> elements,
                      Object source,
                      Key<T> key)
Method Detail

annotatedWith

public BindingBuilder<T> annotatedWith(Class<? extends Annotation> annotationType)
Description copied from interface: AnnotatedBindingBuilder
See the EDSL examples at Binder.

Specified by:
annotatedWith in interface AnnotatedBindingBuilder<T>

annotatedWith

public BindingBuilder<T> annotatedWith(Annotation annotation)
Description copied from interface: AnnotatedBindingBuilder
See the EDSL examples at Binder.

Specified by:
annotatedWith in interface AnnotatedBindingBuilder<T>

to

public BindingBuilder<T> to(Class<? extends T> implementation)
Description copied from interface: LinkedBindingBuilder
See the EDSL examples at Binder.

Specified by:
to in interface LinkedBindingBuilder<T>

to

public BindingBuilder<T> to(TypeLiteral<? extends T> implementation)
Description copied from interface: LinkedBindingBuilder
See the EDSL examples at Binder.

Specified by:
to in interface LinkedBindingBuilder<T>

to

public BindingBuilder<T> to(Key<? extends T> linkedKey)
Description copied from interface: LinkedBindingBuilder
See the EDSL examples at Binder.

Specified by:
to in interface LinkedBindingBuilder<T>

toInstance

public void toInstance(T instance)
Description copied from interface: LinkedBindingBuilder
See the EDSL examples at Binder.

Specified by:
toInstance in interface LinkedBindingBuilder<T>
See Also:
Injector.injectMembers(java.lang.Object)

toProvider

public BindingBuilder<T> toProvider(Provider<? extends T> provider)
Description copied from interface: LinkedBindingBuilder
See the EDSL examples at Binder.

Specified by:
toProvider in interface LinkedBindingBuilder<T>
See Also:
Injector.injectMembers(java.lang.Object)

toProvider

public BindingBuilder<T> toProvider(Class<? extends Provider<? extends T>> providerType)
Description copied from interface: LinkedBindingBuilder
See the EDSL examples at Binder.

Specified by:
toProvider in interface LinkedBindingBuilder<T>

toProvider

public BindingBuilder<T> toProvider(Key<? extends Provider<? extends T>> providerKey)
Description copied from interface: LinkedBindingBuilder
See the EDSL examples at Binder.

Specified by:
toProvider in interface LinkedBindingBuilder<T>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012. All Rights Reserved.