com.google.inject
Interface Binding<T>


public interface Binding<T>

A mapping from a key (type and optional annotation) to a provider of instances of that type. This interface is part of the Injector introspection API and is intended primary for use by tools.

Author:
crazybob@google.com (Bob Lee)

Method Summary
 Key<T> getKey()
          Returns the key for this binding.
 Provider<T> getProvider()
          Returns the provider guice uses to fulfill requests for this binding.
 java.lang.Object getSource()
          Returns an arbitrary object containing information about the "place" where this binding was configured.
 

Method Detail

getKey

Key<T> getKey()
Returns the key for this binding.


getSource

java.lang.Object getSource()
Returns an arbitrary object containing information about the "place" where this binding was configured. Used by Guice in the production of descriptive error messages.


getProvider

Provider<T> getProvider()
Returns the provider guice uses to fulfill requests for this binding.



Copyright © 2008. All Rights Reserved.