Top Description Fields Constructors Methods
com.google.inject.internal

public final Class ConstantBindingBuilderImpl<T>

extends AbstractBindingBuilder<T>
implements AnnotatedConstantBindingBuilder, ConstantBindingBuilder
Class Inheritance
All Implemented Interfaces
com.google.inject.binder.ConstantBindingBuilder, com.google.inject.binder.AnnotatedConstantBindingBuilder
Imports
com.google.common.collect.ImmutableSet, com.google.inject.Binder, .Key, com.google.inject.binder.AnnotatedConstantBindingBuilder, .ConstantBindingBuilder, com.google.inject.spi.Element, .InjectionPoint, java.lang.annotation.Annotation, java.util.List

Bind a constant.
Author
[email protected] (Jesse Wilson)

Field Summary

Inherited from com.google.inject.internal.AbstractBindingBuilder:
ANNOTATION_ALREADY_SPECIFIEDbinderBINDING_TO_NULLCONSTANT_VALUE_ALREADY_SETelementsIMPLEMENTATION_ALREADY_SETNULL_KEYpositionSCOPE_ALREADY_SETSINGLE_INSTANCE_AND_SCOPE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ConstantBindingBuilder
public ConstantBindingBuilder
public void
public void
public void
to(final long value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
public void
to(final boolean value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
public void
to(final double value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
public void
to(final float value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
public void
to(final short value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
public void
to(final char value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
public void
to(final byte value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
public void
public <E extends Enum<E>> void
to(final E value)

Implements com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.
private void
toConstant(Class<?> type, Object instance)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from com.google.inject.internal.AbstractBindingBuilder:
annotatedWithInternalannotatedWithInternalasEagerSingletoncheckNotAnnotatedcheckNotScopedcheckNotTargettedgetBindingininkeyTypeIsSetsetBinding

Constructor Detail

ConstantBindingBuilderImplback to summary
public ConstantBindingBuilderImpl(Binder binder, List<Element> elements, Object source)
Annotations
@SuppressWarnings:unchecked

Method Detail

annotatedWithback to summary
public ConstantBindingBuilder annotatedWith(Class<? extends Annotation> annotationType)

Implements com.google.inject.binder.AnnotatedConstantBindingBuilder.annotatedWith.

Doc from com.google.inject.binder.AnnotatedConstantBindingBuilder.annotatedWith.

See the EDSL examples at com.google.inject.Binder.

Annotations
@Override
annotatedWithback to summary
public ConstantBindingBuilder annotatedWith(Annotation annotation)

Implements com.google.inject.binder.AnnotatedConstantBindingBuilder.annotatedWith.

Doc from com.google.inject.binder.AnnotatedConstantBindingBuilder.annotatedWith.

See the EDSL examples at com.google.inject.Binder.

Annotations
@Override
toback to summary
public void to(final String value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final int value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final long value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final boolean value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final double value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final float value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final short value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final char value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final byte value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public void to(final Class<?> value)

Implements com.google.inject.binder.ConstantBindingBuilder.to, com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toback to summary
public <E extends Enum<E>> void to(final E value)

Implements com.google.inject.binder.ConstantBindingBuilder.to.

Doc from com.google.inject.binder.ConstantBindingBuilder.to.

Binds constant to the given value.

Annotations
@Override
toConstantback to summary
private void toConstant(Class<?> type, Object instance)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override