com.google.inject
Interface Context


public interface Context

Context of the current injection.

Author:
crazybob@google.com (Bob Lee)

Method Summary
 Container getContainer()
          Gets the Container.
 Key<?> getKey()
          Gets the binding key for the object currently being retrieved.
 Member getMember()
          Gets the field, method or constructor which is being injected.
 int getParameterIndex()
          Gets the index of the parameter which is being injected.
 

Method Detail

getContainer

Container getContainer()
Gets the Container.


getMember

Member getMember()
Gets the field, method or constructor which is being injected. Returns null if the object isn't being injected into anywhere (i.e. it's preloaded, returned from Locator.get(), etc.).


getParameterIndex

int getParameterIndex()
Gets the index of the parameter which is being injected. Returns -1 if a parameter isn't being injected.


getKey

Key<?> getKey()
Gets the binding key for the object currently being retrieved.