Package com.google.inject.internal
Class AbstractBindingBuilder<T>
- java.lang.Object
-
- com.google.inject.internal.AbstractBindingBuilder<T>
-
- Direct Known Subclasses:
BindingBuilder,ConstantBindingBuilderImpl
public abstract class AbstractBindingBuilder<T> extends Object
Bind a value or constant.- Author:
- jessewilson@google.com (Jesse Wilson)
-
-
Field Summary
Fields Modifier and Type Field Description static StringANNOTATION_ALREADY_SPECIFIEDprotected Binderbinderstatic StringBINDING_TO_NULLstatic StringCONSTANT_VALUE_ALREADY_SETprotected List<Element>elementsstatic StringIMPLEMENTATION_ALREADY_SETprotected static Key<?>NULL_KEYprotected intpositionstatic StringSCOPE_ALREADY_SETstatic StringSINGLE_INSTANCE_AND_SCOPE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BindingImpl<T>annotatedWithInternal(Annotation annotation)Sets the binding to a copy with the specified annotation on the bound keyprotected BindingImpl<T>annotatedWithInternal(Class<? extends Annotation> annotationType)Sets the binding to a copy with the specified annotation on the bound keyvoidasEagerSingleton()protected voidcheckNotAnnotated()protected voidcheckNotScoped()protected voidcheckNotTargetted()protected BindingImpl<T>getBinding()voidin(Scope scope)voidin(Class<? extends Annotation> scopeAnnotation)protected booleankeyTypeIsSet()protected BindingImpl<T>setBinding(BindingImpl<T> binding)
-
-
-
Field Detail
-
IMPLEMENTATION_ALREADY_SET
public static final String IMPLEMENTATION_ALREADY_SET
- See Also:
- Constant Field Values
-
SINGLE_INSTANCE_AND_SCOPE
public static final String SINGLE_INSTANCE_AND_SCOPE
- See Also:
- Constant Field Values
-
SCOPE_ALREADY_SET
public static final String SCOPE_ALREADY_SET
- See Also:
- Constant Field Values
-
BINDING_TO_NULL
public static final String BINDING_TO_NULL
- See Also:
- Constant Field Values
-
CONSTANT_VALUE_ALREADY_SET
public static final String CONSTANT_VALUE_ALREADY_SET
- See Also:
- Constant Field Values
-
ANNOTATION_ALREADY_SPECIFIED
public static final String ANNOTATION_ALREADY_SPECIFIED
- See Also:
- Constant Field Values
-
NULL_KEY
protected static final Key<?> NULL_KEY
-
position
protected int position
-
binder
protected final Binder binder
-
-
Method Detail
-
getBinding
protected BindingImpl<T> getBinding()
-
setBinding
protected BindingImpl<T> setBinding(BindingImpl<T> binding)
-
annotatedWithInternal
protected BindingImpl<T> annotatedWithInternal(Class<? extends Annotation> annotationType)
Sets the binding to a copy with the specified annotation on the bound key
-
annotatedWithInternal
protected BindingImpl<T> annotatedWithInternal(Annotation annotation)
Sets the binding to a copy with the specified annotation on the bound key
-
in
public void in(Class<? extends Annotation> scopeAnnotation)
-
in
public void in(Scope scope)
-
asEagerSingleton
public void asEagerSingleton()
-
keyTypeIsSet
protected boolean keyTypeIsSet()
-
checkNotTargetted
protected void checkNotTargetted()
-
checkNotAnnotated
protected void checkNotAnnotated()
-
checkNotScoped
protected void checkNotScoped()
-
-