com.google.inject
Class ExposedBindingImpl<T>

java.lang.Object
  extended by com.google.inject.ExposedBindingImpl<T>
All Implemented Interfaces:
Binding<T>, Element

public class ExposedBindingImpl<T>
extends Object


Constructor Summary
ExposedBindingImpl(com.google.inject.InjectorImpl injector, Object source, com.google.inject.ExposedBindingImpl.Factory<T> factory)
           
 
Method Summary
<V> V
acceptScopingVisitor(BindingScopingVisitor<V> visitor)
          Accepts a scoping visitor.
<V> V
acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
          Accepts a target visitor.
<V> V
acceptVisitor(ElementVisitor<V> visitor)
          Accepts an element visitor.
 Key<T> getKey()
          Returns the key for this binding.
 PrivateEnvironment getPrivateEnvironment()
           
 Provider<T> getProvider()
          Returns the scoped provider guice uses to fulfill requests for this binding.
 Scope getScope()
           
 Object getSource()
          Returns an arbitrary object containing information about the "place" where this element was configured.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExposedBindingImpl

public ExposedBindingImpl(com.google.inject.InjectorImpl injector,
                          Object source,
                          com.google.inject.ExposedBindingImpl.Factory<T> factory)
Method Detail

acceptTargetVisitor

public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Description copied from interface: Binding
Accepts a target visitor. Invokes the visitor method specific to this binding's target.

Parameters:
visitor - to call back on

getPrivateEnvironment

public PrivateEnvironment getPrivateEnvironment()

toString

public String toString()

getKey

public Key<T> getKey()
Description copied from interface: Binding
Returns the key for this binding.

Specified by:
getKey in interface Binding<T>

getSource

public Object getSource()
Description copied from interface: Element
Returns an arbitrary object containing information about the "place" where this element was configured. Used by Guice in the production of descriptive error messages.

Tools might specially handle types they know about; StackTraceElement is a good example. Tools should simply call toString() on the source object if the type is unfamiliar.

Specified by:
getSource in interface Element

getProvider

public Provider<T> getProvider()
Description copied from interface: Binding
Returns the scoped provider guice uses to fulfill requests for this binding.

Specified by:
getProvider in interface Binding<T>

getScope

public Scope getScope()

acceptVisitor

public <V> V acceptVisitor(ElementVisitor<V> visitor)
Description copied from interface: Element
Accepts an element visitor. Invokes the visitor method specific to this element's type.

Specified by:
acceptVisitor in interface Element
Parameters:
visitor - to call back on

acceptScopingVisitor

public <V> V acceptScopingVisitor(BindingScopingVisitor<V> visitor)
Description copied from interface: Binding
Accepts a scoping visitor. Invokes the visitor method specific to this binding's scoping.

Specified by:
acceptScopingVisitor in interface Binding<T>
Parameters:
visitor - to call back on