Binding<T>
, Element
, HasDependencies
, ProviderInstanceBinding<T>
public final class ProviderInstanceBindingImpl<T> extends BindingImpl<T> implements ProviderInstanceBinding<T>
Constructor | Description |
---|---|
ProviderInstanceBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
java.util.Set<InjectionPoint> injectionPoints,
Provider<? extends T> providerInstance) |
|
ProviderInstanceBindingImpl(Injector injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Provider<? extends T> providerInstance,
java.util.Set<InjectionPoint> injectionPoints) |
Modifier and Type | Method | Description |
---|---|---|
<V> V |
acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor) |
Accepts a target visitor.
|
void |
applyTo(Binder binder) |
Writes this module element to the given binder (optional operation).
|
java.util.Set<Dependency<?>> |
getDependencies() |
Returns the known dependencies for this type.
|
java.util.Set<InjectionPoint> |
getInjectionPoints() |
Returns the field and method injection points of the provider, injected at injector-creation
time only.
|
Provider<? extends T> |
getProviderInstance() |
Returns the user-supplied, unscoped provider.
|
java.lang.String |
toString() |
|
BindingImpl<T> |
withKey(Key<T> key) |
|
BindingImpl<T> |
withScoping(Scoping scoping) |
acceptScopingVisitor, getKey, getProvider
acceptScopingVisitor, acceptVisitor, getInjector, getInternalFactory, getKey, getProvider, getScoping, getSource, isConstant
acceptVisitor, getSource
public ProviderInstanceBindingImpl(Injector injector, Key<T> key, java.lang.Object source, InternalFactory<? extends T> internalFactory, Scoping scoping, Provider<? extends T> providerInstance, java.util.Set<InjectionPoint> injectionPoints)
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Binding
acceptTargetVisitor
in interface Binding<T>
visitor
- to call back onpublic Provider<? extends T> getProviderInstance()
ProviderInstanceBinding
getProviderInstance
in interface ProviderInstanceBinding<T>
public java.util.Set<InjectionPoint> getInjectionPoints()
ProviderInstanceBinding
getInjectionPoints
in interface ProviderInstanceBinding<T>
public java.util.Set<Dependency<?>> getDependencies()
HasDependencies
Injector
will be
included in the returned set.getDependencies
in interface HasDependencies
public BindingImpl<T> withScoping(Scoping scoping)
withScoping
in class BindingImpl<T>
public BindingImpl<T> withKey(Key<T> key)
withKey
in class BindingImpl<T>
public void applyTo(Binder binder)
Element
public java.lang.String toString()
toString
in class BindingImpl<T>