Package com.google.inject.internal
Class AbstractBindingBuilder<T>
java.lang.Object
com.google.inject.internal.AbstractBindingBuilder<T>
- Direct Known Subclasses:
BindingBuilder
,ConstantBindingBuilderImpl
Base class used to create a new binding with the Guice EDSL described in
Binder
.
Constructing an AbstractBindingBuilder will create a new binding and add it into the Binder
.- Author:
- jessewilson@google.com (Jesse Wilson)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
protected final Binder
The binder that the new binding will be added to.static final String
static final String
The list of elements stored inside thebinder
.static final String
protected static final Key
<?> protected int
The index of the new binding inelements
.static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 keyvoid
protected void
protected void
protected void
protected BindingImpl
<T> void
void
in
(Class<? extends Annotation> scopeAnnotation) protected boolean
protected BindingImpl
<T> setBinding
(BindingImpl<T> binding)
-
Field Details
-
IMPLEMENTATION_ALREADY_SET
- See Also:
-
SINGLE_INSTANCE_AND_SCOPE
- See Also:
-
SCOPE_ALREADY_SET
- See Also:
-
BINDING_TO_NULL
- See Also:
-
CONSTANT_VALUE_ALREADY_SET
- See Also:
-
ANNOTATION_ALREADY_SPECIFIED
- See Also:
-
NULL_KEY
-
binder
The binder that the new binding will be added to. -
elements
The list of elements stored inside thebinder
. The new binding is added to this list. -
position
protected int position
-
-
Constructor Details
-
AbstractBindingBuilder
-
-
Method Details
-
getBinding
-
setBinding
-
annotatedWithInternal
Sets the binding to a copy with the specified annotation on the bound key -
annotatedWithInternal
Sets the binding to a copy with the specified annotation on the bound key -
in
-
in
-
asEagerSingleton
public void asEagerSingleton() -
keyTypeIsSet
protected boolean keyTypeIsSet() -
checkNotTargetted
protected void checkNotTargetted() -
checkNotAnnotated
protected void checkNotAnnotated() -
checkNotScoped
protected void checkNotScoped()
-