|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 | |
---|---|
void |
accept(BindingVisitor<? super T> visitor)
Accepts a binding visitor. |
Key<T> |
getKey()
Returns the key for this binding. |
Provider<T> |
getProvider()
Returns the scoped provider guice uses to fulfill requests for this binding. |
Scope |
getScope()
Returns the scope applied by this binding. |
Object |
getSource()
Returns an arbitrary object containing information about the "place" where this binding was configured. |
Method Detail |
---|
Key<T> getKey()
Object getSource()
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.
Provider<T> getProvider()
Scope getScope()
void accept(BindingVisitor<? super T> visitor)
visitor
- to call back on
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |