Package com.google.inject.internal
Class InjectorBindingData
- java.lang.Object
-
- com.google.inject.internal.InjectorBindingData
-
class InjectorBindingData extends java.lang.Object
A container that stores an injector's binding data. This excludes JIT binding data, which is stored inInjectorJitBindingData
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<TypeConverterBinding>
converters
private java.util.Map<Key<?>,Binding<?>>
explicitBindings
private java.util.Map<Key<?>,Binding<?>>
explicitBindingsMutable
private com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>>
indexedExplicitBindings
private java.util.Set<InjectionRequest<?>>
injectionRequests
private java.util.List<InterceptorBinding>
interceptorBindings
private java.util.Set<MembersInjectorLookup<?>>
membersInjectorLookups
private java.util.Optional<InjectorBindingData>
parent
private java.util.Set<ProviderLookup<?>>
providerLookups
private java.util.List<ProvisionListenerBinding>
provisionListenerBindings
private java.util.List<ModuleAnnotatedMethodScannerBinding>
scannerBindings
private java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,ScopeBinding>
scopes
private java.util.Set<StaticInjectionRequest>
staticInjectionRequests
private java.util.List<TypeListenerBinding>
typeListenerBindings
-
Constructor Summary
Constructors Constructor Description InjectorBindingData(java.util.Optional<InjectorBindingData> parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConverter(TypeConverterBinding typeConverterBinding)
void
addInterceptorBinding(InterceptorBinding interceptorBinding)
void
addProvisionListener(ProvisionListenerBinding listenerBinding)
void
addScanner(ModuleAnnotatedMethodScannerBinding scanner)
void
addTypeListener(TypeListenerBinding listenerBinding)
TypeConverterBinding
getConverter(java.lang.String stringValue, TypeLiteral<?> type, Errors errors, java.lang.Object source)
java.lang.Iterable<TypeConverterBinding>
getConvertersThisLevel()
<T> BindingImpl<T>
getExplicitBinding(Key<T> key)
java.util.Map<Key<?>,Binding<?>>
getExplicitBindingsThisLevel()
com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>>
getIndexedExplicitBindings()
java.util.Set<InjectionRequest<?>>
getInjectionRequestsThisLevel()
com.google.common.collect.ImmutableList<InterceptorBinding>
getInterceptorBindings()
com.google.common.collect.ImmutableList<InterceptorBinding>
getInterceptorBindingsThisLevel()
java.util.Set<MembersInjectorLookup<?>>
getMembersInjectorLookupsThisLevel()
java.util.Set<ProviderLookup<?>>
getProviderLookupsThisLevel()
com.google.common.collect.ImmutableList<ProvisionListenerBinding>
getProvisionListenerBindings()
com.google.common.collect.ImmutableList<ProvisionListenerBinding>
getProvisionListenerBindingsThisLevel()
com.google.common.collect.ImmutableList<ModuleAnnotatedMethodScannerBinding>
getScannerBindings()
com.google.common.collect.ImmutableList<ModuleAnnotatedMethodScannerBinding>
getScannerBindingsThisLevel()
ScopeBinding
getScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
java.util.Collection<ScopeBinding>
getScopeBindingsThisLevel()
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope>
getScopes()
java.util.Set<StaticInjectionRequest>
getStaticInjectionRequestsThisLevel()
com.google.common.collect.ImmutableList<TypeListenerBinding>
getTypeListenerBindings()
com.google.common.collect.ImmutableList<TypeListenerBinding>
getTypeListenerBindingsThisLevel()
(package private) void
indexBindingsByType()
Once the injector's explicit bindings are finalized, this method is called to index all explicit bindings by their return type.java.util.Optional<InjectorBindingData>
parent()
void
putBinding(Key<?> key, BindingImpl<?> binding)
void
putInjectionRequest(InjectionRequest<?> injectionRequest)
void
putMembersInjectorLookup(MembersInjectorLookup<?> membersInjectorLookup)
void
putProviderLookup(ProviderLookup<?> lookup)
void
putScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, ScopeBinding scope)
void
putStaticInjectionRequest(StaticInjectionRequest staticInjectionRequest)
-
-
-
Field Detail
-
parent
private final java.util.Optional<InjectorBindingData> parent
-
scopes
private final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,ScopeBinding> scopes
-
providerLookups
private final java.util.Set<ProviderLookup<?>> providerLookups
-
staticInjectionRequests
private final java.util.Set<StaticInjectionRequest> staticInjectionRequests
-
membersInjectorLookups
private final java.util.Set<MembersInjectorLookup<?>> membersInjectorLookups
-
injectionRequests
private final java.util.Set<InjectionRequest<?>> injectionRequests
-
converters
private final java.util.List<TypeConverterBinding> converters
-
interceptorBindings
private final java.util.List<InterceptorBinding> interceptorBindings
-
typeListenerBindings
private final java.util.List<TypeListenerBinding> typeListenerBindings
-
provisionListenerBindings
private final java.util.List<ProvisionListenerBinding> provisionListenerBindings
-
scannerBindings
private final java.util.List<ModuleAnnotatedMethodScannerBinding> scannerBindings
-
indexedExplicitBindings
private final com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>> indexedExplicitBindings
-
-
Constructor Detail
-
InjectorBindingData
InjectorBindingData(java.util.Optional<InjectorBindingData> parent)
-
-
Method Detail
-
parent
public java.util.Optional<InjectorBindingData> parent()
-
getExplicitBinding
public <T> BindingImpl<T> getExplicitBinding(Key<T> key)
-
getExplicitBindingsThisLevel
public java.util.Map<Key<?>,Binding<?>> getExplicitBindingsThisLevel()
-
putBinding
public void putBinding(Key<?> key, BindingImpl<?> binding)
-
putProviderLookup
public void putProviderLookup(ProviderLookup<?> lookup)
-
getProviderLookupsThisLevel
public java.util.Set<ProviderLookup<?>> getProviderLookupsThisLevel()
-
putStaticInjectionRequest
public void putStaticInjectionRequest(StaticInjectionRequest staticInjectionRequest)
-
getStaticInjectionRequestsThisLevel
public java.util.Set<StaticInjectionRequest> getStaticInjectionRequestsThisLevel()
-
putInjectionRequest
public void putInjectionRequest(InjectionRequest<?> injectionRequest)
-
getInjectionRequestsThisLevel
public java.util.Set<InjectionRequest<?>> getInjectionRequestsThisLevel()
-
putMembersInjectorLookup
public void putMembersInjectorLookup(MembersInjectorLookup<?> membersInjectorLookup)
-
getMembersInjectorLookupsThisLevel
public java.util.Set<MembersInjectorLookup<?>> getMembersInjectorLookupsThisLevel()
-
getScopeBinding
public ScopeBinding getScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
-
putScopeBinding
public void putScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, ScopeBinding scope)
-
getScopeBindingsThisLevel
public java.util.Collection<ScopeBinding> getScopeBindingsThisLevel()
-
getConvertersThisLevel
public java.lang.Iterable<TypeConverterBinding> getConvertersThisLevel()
-
addConverter
public void addConverter(TypeConverterBinding typeConverterBinding)
-
getConverter
public TypeConverterBinding getConverter(java.lang.String stringValue, TypeLiteral<?> type, Errors errors, java.lang.Object source)
-
addInterceptorBinding
public void addInterceptorBinding(InterceptorBinding interceptorBinding)
-
getInterceptorBindings
public com.google.common.collect.ImmutableList<InterceptorBinding> getInterceptorBindings()
-
getInterceptorBindingsThisLevel
public com.google.common.collect.ImmutableList<InterceptorBinding> getInterceptorBindingsThisLevel()
-
addTypeListener
public void addTypeListener(TypeListenerBinding listenerBinding)
-
getTypeListenerBindings
public com.google.common.collect.ImmutableList<TypeListenerBinding> getTypeListenerBindings()
-
getTypeListenerBindingsThisLevel
public com.google.common.collect.ImmutableList<TypeListenerBinding> getTypeListenerBindingsThisLevel()
-
addProvisionListener
public void addProvisionListener(ProvisionListenerBinding listenerBinding)
-
getProvisionListenerBindings
public com.google.common.collect.ImmutableList<ProvisionListenerBinding> getProvisionListenerBindings()
-
getProvisionListenerBindingsThisLevel
public com.google.common.collect.ImmutableList<ProvisionListenerBinding> getProvisionListenerBindingsThisLevel()
-
addScanner
public void addScanner(ModuleAnnotatedMethodScannerBinding scanner)
-
getScannerBindings
public com.google.common.collect.ImmutableList<ModuleAnnotatedMethodScannerBinding> getScannerBindings()
-
getScannerBindingsThisLevel
public com.google.common.collect.ImmutableList<ModuleAnnotatedMethodScannerBinding> getScannerBindingsThisLevel()
-
getScopes
public java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope> getScopes()
-
indexBindingsByType
void indexBindingsByType()
Once the injector's explicit bindings are finalized, this method is called to index all explicit bindings by their return type.
-
getIndexedExplicitBindings
public com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>> getIndexedExplicitBindings()
-
-