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.


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.
 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

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 2007 Google Inc. All Rights Reserved.