|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
V
- any type to be returned by the visit method. Use Void
with
return null
if no return type is needed.public interface BindingTargetVisitor<T,V>
Visits each of the strategies used to find an instance to satisfy an injection.
Method Summary | |
---|---|
V |
visitConstructor(Constructor<? extends T> constructor,
Set<InjectionPoint> injectionPoints)
Visit a constructor binding. |
V |
visitConvertedConstant(T value)
Visit a binding created from converting a bound instance to a new type. |
V |
visitInstance(T instance,
Set<InjectionPoint> injectionPoints)
Visit a instance binding. |
V |
visitKey(Key<? extends T> key)
Visit a linked key binding. |
V |
visitProvider(Provider<? extends T> provider,
Set<InjectionPoint> injectionPoints)
Visit a provider instance binding. |
V |
visitProviderBinding(Key<?> provided)
Visit a binding to a Provider that delegates to the binding for the
provided type. |
V |
visitProviderKey(Key<? extends Provider<? extends T>> providerKey)
Visit a provider key binding. |
V |
visitUntargetted()
Visit an untargetted binding. |
Method Detail |
---|
V visitInstance(T instance, Set<InjectionPoint> injectionPoints)
instance
- the user-supplied valueinjectionPoints
- the field and method injection points of the instance, injected at
injector-creation time only.V visitProvider(Provider<? extends T> provider, Set<InjectionPoint> injectionPoints)
get
method is invoked to resolve
injections. This target is found in both module and injector bindings.
provider
- the user-supplied, unscoped providerinjectionPoints
- the field and method injection points of the provider, injected at
injector-creation time only.V visitProviderKey(Key<? extends Provider<? extends T>> providerKey)
get
method is invoked. This target is found in both
module and injector bindings.
providerKey
- the key used to resolve the provider's binding. That binding can be
retrieved from an injector using Injector.getBinding(providerKey)
V visitKey(Key<? extends T> key)
key
- the linked key used to resolve injections. That binding can be retrieved from an
injector using Injector.getBinding(key)
V visitUntargetted()
V visitConstructor(Constructor<? extends T> constructor, Set<InjectionPoint> injectionPoints)
constructor
. This target is found only on injector bindings.
constructor
- the annotated
or default constructor that
is invoked for creating valuesinjectionPoints
- the constructor, field and method injection points to create and
populate a new instance. The set contains exactly one constructor injection point.V visitConvertedConstant(T value)
value
- the converted valueV visitProviderBinding(Key<?> provided)
Provider
that delegates to the binding for the
provided type. This target is found only on injector bindings.
provided
- the key whose binding is used to provide
instances
. That binding can be retrieved from an injector using Injector.getBinding(provided)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |