Class AbstractBindingBuilder<T>
java.lang.Object
org.elasticsearch.common.inject.internal.AbstractBindingBuilder<T>
- Direct Known Subclasses:
BindingBuilder
,ConstantBindingBuilderImpl
public abstract class AbstractBindingBuilder<T>
extends java.lang.Object
Bind a value or constant.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ANNOTATION_ALREADY_SPECIFIED
protected Binder
binder
static java.lang.String
BINDING_TO_NULL
static java.lang.String
CONSTANT_VALUE_ALREADY_SET
protected java.util.List<Element>
elements
static java.lang.String
IMPLEMENTATION_ALREADY_SET
protected static Key<?>
NULL_KEY
protected int
position
static java.lang.String
SCOPE_ALREADY_SET
static java.lang.String
SINGLE_INSTANCE_AND_SCOPE
-
Constructor Summary
Constructors Constructor Description AbstractBindingBuilder(Binder binder, java.util.List<Element> elements, java.lang.Object source, Key<T> key)
-
Method Summary
Modifier and Type Method Description protected BindingImpl<T>
annotatedWithInternal(java.lang.annotation.Annotation annotation)
Sets the binding to a copy with the specified annotation on the bound keyprotected BindingImpl<T>
annotatedWithInternal(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Sets the binding to a copy with the specified annotation on the bound keyvoid
asEagerSingleton()
protected void
checkNotAnnotated()
protected void
checkNotScoped()
protected void
checkNotTargetted()
protected BindingImpl<T>
getBinding()
void
in(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
void
in(Scope scope)
protected boolean
keyTypeIsSet()
protected BindingImpl<T>
setBinding(BindingImpl<T> binding)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
IMPLEMENTATION_ALREADY_SET
public static final java.lang.String IMPLEMENTATION_ALREADY_SET- See Also:
- Constant Field Values
-
SINGLE_INSTANCE_AND_SCOPE
public static final java.lang.String SINGLE_INSTANCE_AND_SCOPE- See Also:
- Constant Field Values
-
SCOPE_ALREADY_SET
public static final java.lang.String SCOPE_ALREADY_SET- See Also:
- Constant Field Values
-
BINDING_TO_NULL
public static final java.lang.String BINDING_TO_NULL- See Also:
- Constant Field Values
-
CONSTANT_VALUE_ALREADY_SET
public static final java.lang.String CONSTANT_VALUE_ALREADY_SET- See Also:
- Constant Field Values
-
ANNOTATION_ALREADY_SPECIFIED
public static final java.lang.String ANNOTATION_ALREADY_SPECIFIED- See Also:
- Constant Field Values
-
NULL_KEY
-
elements
-
position
protected int position -
binder
-
-
Constructor Details
-
AbstractBindingBuilder
-
-
Method Details
-
getBinding
-
setBinding
-
annotatedWithInternal
protected BindingImpl<T> annotatedWithInternal(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)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
public void in(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation) -
in
-
asEagerSingleton
public void asEagerSingleton() -
keyTypeIsSet
protected boolean keyTypeIsSet() -
checkNotTargetted
protected void checkNotTargetted() -
checkNotAnnotated
protected void checkNotAnnotated() -
checkNotScoped
protected void checkNotScoped()
-