Class ConstantBindingBuilderImpl<T>
java.lang.Object
org.elasticsearch.common.inject.internal.AbstractBindingBuilder<T>
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.
-
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
ConstructorDescriptionConstantBindingBuilderImpl(Binder binder, List<Element> elements, Object source)
-
Method Summary
Modifier and TypeMethodDescriptionannotatedWith(Annotation annotation)
See the EDSL examples atBinder
.annotatedWith(Class<? extends Annotation> annotationType)
See the EDSL examples atBinder
.void
to(boolean value)
Binds constant to the given value.void
to(char value)
Binds constant to the given value.void
to(double 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.<E extends Enum<E>>
voidto(E value)
Binds constant to the given value.void
Binds constant to the given value.void
Binds constant to the given value.toString()
Methods inherited from class org.elasticsearch.common.inject.internal.AbstractBindingBuilder
annotatedWithInternal, annotatedWithInternal, asEagerSingleton, checkNotAnnotated, checkNotScoped, checkNotTargetted, getBinding, in, in, keyTypeIsSet, setBinding
-
Constructor Details
-
ConstantBindingBuilderImpl
-
-
Method Details
-
annotatedWith
Description copied from interface:AnnotatedConstantBindingBuilder
See the EDSL examples atBinder
.- Specified by:
annotatedWith
in interfaceAnnotatedConstantBindingBuilder
-
annotatedWith
Description copied from interface:AnnotatedConstantBindingBuilder
See the EDSL examples atBinder
.- Specified by:
annotatedWith
in interfaceAnnotatedConstantBindingBuilder
-
to
Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
public void to(int value)Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
public void to(long value)Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
public void to(boolean value)Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
public void to(double value)Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
public void to(float value)Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
public void to(short value)Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
public void to(char value)Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
to
Description copied from interface:ConstantBindingBuilder
Binds constant to the given value.- Specified by:
to
in interfaceConstantBindingBuilder
-
toString
-