Package com.google.inject.internal
Class InjectorImpl.SyntheticProviderBindingImpl<T>
- java.lang.Object
-
- com.google.inject.internal.BindingImpl<Provider<T>>
-
- com.google.inject.internal.InjectorImpl.SyntheticProviderBindingImpl<T>
-
- All Implemented Interfaces:
Binding<Provider<T>>
,Element
,HasDependencies
,ProviderBinding<Provider<T>>
- Enclosing class:
- InjectorImpl
private static class InjectorImpl.SyntheticProviderBindingImpl<T> extends BindingImpl<Provider<T>> implements ProviderBinding<Provider<T>>, HasDependencies
A framework-created JIT Providerbinding.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) BindingImpl<T>
providedBinding
-
Constructor Summary
Constructors Constructor Description SyntheticProviderBindingImpl(InjectorImpl injector, Key<Provider<T>> key, Binding<T> providedBinding)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> V
acceptTargetVisitor(BindingTargetVisitor<? super Provider<T>,V> visitor)
Accepts a target visitor.void
applyTo(Binder binder)
Writes this module element to the given binder (optional operation).(package private) static <T> InternalFactory<Provider<T>>
createInternalFactory(Binding<T> providedBinding)
boolean
equals(java.lang.Object obj)
java.util.Set<Dependency<?>>
getDependencies()
Returns the known dependencies for this type.Key<? extends T>
getProvidedKey()
Returns the key whose binding is used toprovide instances
.int
hashCode()
java.lang.String
toString()
-
Methods inherited from class com.google.inject.internal.BindingImpl
acceptScopingVisitor, acceptVisitor, getInjector, getInternalFactory, getKey, getProvider, getScoping, getSource, isConstant, withKey, withScoping
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.inject.Binding
acceptScopingVisitor, getKey, getProvider
-
Methods inherited from interface com.google.inject.spi.Element
acceptVisitor, getSource
-
-
-
-
Field Detail
-
providedBinding
final BindingImpl<T> providedBinding
-
-
Method Detail
-
createInternalFactory
static <T> InternalFactory<Provider<T>> createInternalFactory(Binding<T> providedBinding)
-
getProvidedKey
public Key<? extends T> getProvidedKey()
Description copied from interface:ProviderBinding
Returns the key whose binding is used toprovide instances
. That binding can be retrieved from an injector usingInjector.getBinding(providedKey)
- Specified by:
getProvidedKey
in interfaceProviderBinding<T>
-
acceptTargetVisitor
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super Provider<T>,V> visitor)
Description copied from interface:Binding
Accepts a target visitor. Invokes the visitor method specific to this binding's target.- Specified by:
acceptTargetVisitor
in interfaceBinding<T>
- Parameters:
visitor
- to call back on
-
applyTo
public void applyTo(Binder binder)
Description copied from interface:Element
Writes this module element to the given binder (optional operation).
-
toString
public java.lang.String toString()
- Overrides:
toString
in classBindingImpl<Provider<T>>
-
getDependencies
public java.util.Set<Dependency<?>> getDependencies()
Description copied from interface:HasDependencies
Returns the known dependencies for this type. If this has dependencies whose values are not known statically, a dependency for theInjector
will be included in the returned set.- Specified by:
getDependencies
in interfaceHasDependencies
- Returns:
- a possibly empty set
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-