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

java.lang.Object
  extended by org.elasticsearch.common.inject.internal.AbstractBindingBuilder<T>
      extended by org.elasticsearch.common.inject.internal.ConstantBindingBuilderImpl<T>
All Implemented Interfaces:
AnnotatedConstantBindingBuilder, ConstantBindingBuilder

public final class ConstantBindingBuilderImpl<T>
extends AbstractBindingBuilder<T>
implements AnnotatedConstantBindingBuilder, ConstantBindingBuilder

Bind a constant.

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
ConstantBindingBuilderImpl(Binder binder, List<Element> elements, Object source)
           
 
Method Summary
 ConstantBindingBuilder annotatedWith(Annotation annotation)
          See the EDSL examples at Binder.
 ConstantBindingBuilder annotatedWith(Class<? extends Annotation> annotationType)
          See the EDSL examples at Binder.
 void to(boolean value)
          Binds constant to the given value.
 void to(char value)
          Binds constant to the given value.
 void to(Class<?> value)
          Binds constant to the given value.
 void to(double value)
          Binds constant to the given value.
<E extends Enum<E>>
void
to(E value)
          Binds constant to the given value.
 void to(float value)
          Binds constant to the given value.
 void to(int value)
          Binds constant to the given value.
 void to(long value)
          Binds constant to the given value.
 void to(short value)
          Binds constant to the given value.
 void to(String value)
          Binds constant to the given value.
 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
 

Constructor Detail

ConstantBindingBuilderImpl

public ConstantBindingBuilderImpl(Binder binder,
                                  List<Element> elements,
                                  Object source)
Method Detail

annotatedWith

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

Specified by:
annotatedWith in interface AnnotatedConstantBindingBuilder

annotatedWith

public ConstantBindingBuilder annotatedWith(Annotation annotation)
Description copied from interface: AnnotatedConstantBindingBuilder
See the EDSL examples at Binder.

Specified by:
annotatedWith in interface AnnotatedConstantBindingBuilder

to

public void to(String value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(int value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(long value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(boolean value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(double value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(float value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(short value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(char value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public void to(Class<?> value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

to

public <E extends Enum<E>> void to(E value)
Description copied from interface: ConstantBindingBuilder
Binds constant to the given value.

Specified by:
to in interface ConstantBindingBuilder

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012. All Rights Reserved.