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 Stringprotected final BinderThe binder that the new binding will be added to.static final Stringstatic final StringThe list of elements stored inside thebinder.static final Stringprotected static final Key<?> protected intThe index of the new binding inelements.static final Stringstatic 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 keyvoidprotected voidprotected voidprotected voidprotected BindingImpl<T> voidvoidin(Class<? extends Annotation> scopeAnnotation) protected booleanprotected 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()
-