Package com.google.inject.internal
Class InjectorBindingData
- java.lang.Object
-
- com.google.inject.internal.InjectorBindingData
-
class InjectorBindingData extends java.lang.ObjectA 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>convertersprivate java.util.Map<Key<?>,Binding<?>>explicitBindingsprivate java.util.Map<Key<?>,Binding<?>>explicitBindingsMutableprivate com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>>indexedExplicitBindingsprivate java.util.Set<InjectionRequest<?>>injectionRequestsprivate java.util.List<InterceptorBinding>interceptorBindingsprivate java.util.Set<MembersInjectorLookup<?>>membersInjectorLookupsprivate java.util.Optional<InjectorBindingData>parentprivate java.util.Set<ProviderLookup<?>>providerLookupsprivate java.util.List<ProvisionListenerBinding>provisionListenerBindingsprivate java.util.List<ModuleAnnotatedMethodScannerBinding>scannerBindingsprivate java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,ScopeBinding>scopesprivate java.util.Set<StaticInjectionRequest>staticInjectionRequestsprivate 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 voidaddConverter(TypeConverterBinding typeConverterBinding)voidaddInterceptorBinding(InterceptorBinding interceptorBinding)voidaddProvisionListener(ProvisionListenerBinding listenerBinding)voidaddScanner(ModuleAnnotatedMethodScannerBinding scanner)voidaddTypeListener(TypeListenerBinding listenerBinding)TypeConverterBindinggetConverter(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()ScopeBindinggetScopeBinding(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) voidindexBindingsByType()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()voidputBinding(Key<?> key, BindingImpl<?> binding)voidputInjectionRequest(InjectionRequest<?> injectionRequest)voidputMembersInjectorLookup(MembersInjectorLookup<?> membersInjectorLookup)voidputProviderLookup(ProviderLookup<?> lookup)voidputScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, ScopeBinding scope)voidputStaticInjectionRequest(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()
-
-