| Modifier and Type | Field and Description |
|---|---|
private WeakKeySet |
blacklistedKeys |
private java.util.List<TypeConverterBinding> |
converters |
private java.util.Map<Key<?>,Binding<?>> |
explicitBindings |
private java.util.Map<Key<?>,Binding<?>> |
explicitBindingsMutable |
private java.util.Set<InjectionRequest<?>> |
injectionRequests |
private java.lang.Object |
lock |
private java.util.Set<MembersInjectorLookup<?>> |
membersInjectorLookups |
private State |
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 and Description |
|---|
InheritingState(State parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConverter(TypeConverterBinding typeConverterBinding) |
void |
addProvisionListener(ProvisionListenerBinding listenerBinding) |
void |
addScanner(ModuleAnnotatedMethodScannerBinding scanner) |
void |
addTypeListener(TypeListenerBinding listenerBinding) |
void |
blacklist(Key<?> key,
State state,
java.lang.Object source)
Forbids the corresponding injector from creating a binding to
key. |
TypeConverterBinding |
getConverter(java.lang.String stringValue,
TypeLiteral<?> type,
Errors errors,
java.lang.Object source)
Returns the matching converter for
type, or null if none match. |
java.lang.Iterable<TypeConverterBinding> |
getConvertersThisLevel()
Returns all converters at this level only.
|
<T> BindingImpl<T> |
getExplicitBinding(Key<T> key)
Gets a binding which was specified explicitly in a module, or null.
|
java.util.Map<Key<?>,Binding<?>> |
getExplicitBindingsThisLevel()
Returns the explicit bindings at this level only.
|
java.util.Set<InjectionRequest<?>> |
getInjectionRequestsThisLevel() |
java.util.Set<MembersInjectorLookup<?>> |
getMembersInjectorLookupsThisLevel() |
java.util.Set<ProviderLookup<?>> |
getProviderLookupsThisLevel() |
java.util.List<ProvisionListenerBinding> |
getProvisionListenerBindings() |
java.util.List<ProvisionListenerBinding> |
getProvisionListenerBindingsThisLevel() |
java.util.List<ModuleAnnotatedMethodScannerBinding> |
getScannerBindings() |
java.util.List<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()
Returns all the scope bindings at this level and parent levels.
|
java.util.Set<java.lang.Object> |
getSourcesForBlacklistedKey(Key<?> key)
Returns the source of a blacklisted key.
|
java.util.Set<StaticInjectionRequest> |
getStaticInjectionRequestsThisLevel() |
java.util.List<TypeListenerBinding> |
getTypeListenerBindings() |
java.util.List<TypeListenerBinding> |
getTypeListenerBindingsThisLevel() |
boolean |
isBlacklisted(Key<?> key)
Returns true if
key is forbidden from being bound in this injector. |
java.lang.Object |
lock()
Returns the shared lock for all injector data.
|
State |
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) |
private final State parent
private final java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,ScopeBinding> scopes
private final java.util.Set<ProviderLookup<?>> providerLookups
private final java.util.Set<StaticInjectionRequest> staticInjectionRequests
private final java.util.Set<MembersInjectorLookup<?>> membersInjectorLookups
private final java.util.Set<InjectionRequest<?>> injectionRequests
private final java.util.List<TypeConverterBinding> converters
private final java.util.List<TypeListenerBinding> typeListenerBindings
private final java.util.List<ProvisionListenerBinding> provisionListenerBindings
private final java.util.List<ModuleAnnotatedMethodScannerBinding> scannerBindings
private final WeakKeySet blacklistedKeys
private final java.lang.Object lock
InheritingState(State parent)
public <T> BindingImpl<T> getExplicitBinding(Key<T> key)
StategetExplicitBinding in interface Statepublic java.util.Map<Key<?>,Binding<?>> getExplicitBindingsThisLevel()
StategetExplicitBindingsThisLevel in interface Statepublic void putBinding(Key<?> key, BindingImpl<?> binding)
putBinding in interface Statepublic void putProviderLookup(ProviderLookup<?> lookup)
putProviderLookup in interface Statepublic java.util.Set<ProviderLookup<?>> getProviderLookupsThisLevel()
getProviderLookupsThisLevel in interface Statepublic void putStaticInjectionRequest(StaticInjectionRequest staticInjectionRequest)
putStaticInjectionRequest in interface Statepublic java.util.Set<StaticInjectionRequest> getStaticInjectionRequestsThisLevel()
getStaticInjectionRequestsThisLevel in interface Statepublic void putInjectionRequest(InjectionRequest<?> injectionRequest)
putInjectionRequest in interface Statepublic java.util.Set<InjectionRequest<?>> getInjectionRequestsThisLevel()
getInjectionRequestsThisLevel in interface Statepublic void putMembersInjectorLookup(MembersInjectorLookup<?> membersInjectorLookup)
putMembersInjectorLookup in interface Statepublic java.util.Set<MembersInjectorLookup<?>> getMembersInjectorLookupsThisLevel()
getMembersInjectorLookupsThisLevel in interface Statepublic ScopeBinding getScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
getScopeBinding in interface Statepublic void putScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
ScopeBinding scope)
putScopeBinding in interface Statepublic java.util.Collection<ScopeBinding> getScopeBindingsThisLevel()
getScopeBindingsThisLevel in interface Statepublic java.lang.Iterable<TypeConverterBinding> getConvertersThisLevel()
StategetConvertersThisLevel in interface Statepublic void addConverter(TypeConverterBinding typeConverterBinding)
addConverter in interface Statepublic TypeConverterBinding getConverter(java.lang.String stringValue, TypeLiteral<?> type, Errors errors, java.lang.Object source)
Statetype, or null if none match.getConverter in interface Statepublic void addTypeListener(TypeListenerBinding listenerBinding)
addTypeListener in interface Statepublic java.util.List<TypeListenerBinding> getTypeListenerBindings()
getTypeListenerBindings in interface Statepublic java.util.List<TypeListenerBinding> getTypeListenerBindingsThisLevel()
getTypeListenerBindingsThisLevel in interface Statepublic void addProvisionListener(ProvisionListenerBinding listenerBinding)
addProvisionListener in interface Statepublic java.util.List<ProvisionListenerBinding> getProvisionListenerBindings()
getProvisionListenerBindings in interface Statepublic java.util.List<ProvisionListenerBinding> getProvisionListenerBindingsThisLevel()
getProvisionListenerBindingsThisLevel in interface Statepublic void addScanner(ModuleAnnotatedMethodScannerBinding scanner)
addScanner in interface Statepublic java.util.List<ModuleAnnotatedMethodScannerBinding> getScannerBindings()
getScannerBindings in interface Statepublic java.util.List<ModuleAnnotatedMethodScannerBinding> getScannerBindingsThisLevel()
getScannerBindingsThisLevel in interface Statepublic void blacklist(Key<?> key, State state, java.lang.Object source)
Statekey. Child injectors
blacklist their bound keys on their parent injectors to prevent just-in-time bindings on the
parent injector that would conflict and pass along their state to control the lifetimes.public boolean isBlacklisted(Key<?> key)
Statekey is forbidden from being bound in this injector. This indicates that
one of this injector's descendent's has bound the key.isBlacklisted in interface Statepublic java.util.Set<java.lang.Object> getSourcesForBlacklistedKey(Key<?> key)
StategetSourcesForBlacklistedKey in interface Statepublic java.lang.Object lock()
State