Package com.google.inject.internal
Class ConstantBindingBuilderImpl<T>
- java.lang.Object
-
- com.google.inject.internal.AbstractBindingBuilder<T>
-
- com.google.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 com.google.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
Constructors Constructor Description ConstantBindingBuilderImpl(Binder binder, List<Element> elements, Object source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstantBindingBuilderannotatedWith(Annotation annotation)See the EDSL examples atBinder.ConstantBindingBuilderannotatedWith(Class<? extends Annotation> annotationType)See the EDSL examples atBinder.voidto(boolean value)Binds constant to the given value.voidto(byte value)Binds constant to the given value.voidto(char value)Binds constant to the given value.voidto(double value)Binds constant to the given value.voidto(float value)Binds constant to the given value.voidto(int value)Binds constant to the given value.voidto(long value)Binds constant to the given value.voidto(short value)Binds constant to the given value.<E extends Enum<E>>
voidto(E value)Binds constant to the given value.voidto(Class<?> value)Binds constant to the given value.voidto(String value)Binds constant to the given value.StringtoString()-
Methods inherited from class com.google.inject.internal.AbstractBindingBuilder
annotatedWithInternal, annotatedWithInternal, asEagerSingleton, checkNotAnnotated, checkNotScoped, checkNotTargetted, getBinding, in, in, keyTypeIsSet, setBinding
-
-
-
-
Method Detail
-
annotatedWith
public ConstantBindingBuilder annotatedWith(Class<? extends Annotation> annotationType)
Description copied from interface:AnnotatedConstantBindingBuilderSee the EDSL examples atBinder.- Specified by:
annotatedWithin interfaceAnnotatedConstantBindingBuilder
-
annotatedWith
public ConstantBindingBuilder annotatedWith(Annotation annotation)
Description copied from interface:AnnotatedConstantBindingBuilderSee the EDSL examples atBinder.- Specified by:
annotatedWithin interfaceAnnotatedConstantBindingBuilder
-
to
public void to(String value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(int value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(long value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(boolean value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(double value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(float value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(short value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(char value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(byte value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public void to(Class<?> value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
to
public <E extends Enum<E>> void to(E value)
Description copied from interface:ConstantBindingBuilderBinds constant to the given value.- Specified by:
toin interfaceConstantBindingBuilder
-
-