org.elasticsearch.common.inject.internal
Class AbstractBindingBuilder<T>

java.lang.Object
  extended by org.elasticsearch.common.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
static String ANNOTATION_ALREADY_SPECIFIED
           
protected  Binder binder
           
static String BINDING_TO_NULL
           
static String CONSTANT_VALUE_ALREADY_SET
           
protected  List<Element> elements
           
static String IMPLEMENTATION_ALREADY_SET
           
protected static Key<?> NULL_KEY
           
protected  int position
           
static String SCOPE_ALREADY_SET
           
static String SINGLE_INSTANCE_AND_SCOPE
           
 
Constructor Summary
AbstractBindingBuilder(Binder binder, List<Element> elements, Object source, Key<T> key)
           
 
Method Summary
protected  BindingImpl<T> annotatedWithInternal(Annotation annotation)
          Sets the binding to a copy with the specified annotation on the bound key
protected  BindingImpl<T> annotatedWithInternal(Class<? extends Annotation> annotationType)
          Sets the binding to a copy with the specified annotation on the bound key
 void asEagerSingleton()
           
protected  void checkNotAnnotated()
           
protected  void checkNotScoped()
           
protected  void checkNotTargetted()
           
protected  BindingImpl<T> getBinding()
           
 void in(Class<? extends 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 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

elements

protected List<Element> elements

position

protected int position

binder

protected final Binder binder
Constructor Detail

AbstractBindingBuilder

public AbstractBindingBuilder(Binder binder,
                              List<Element> elements,
                              Object source,
                              Key<T> key)
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()


Copyright © 2009-2012. All Rights Reserved.