interface State
Modifier and Type | Method and Description |
---|---|
void |
addConverter(TypeConverterBinding typeConverterBinding) |
void |
addProvisionListener(ProvisionListenerBinding provisionListenerBinding) |
void |
addScanner(ModuleAnnotatedMethodScannerBinding scanner) |
void |
addTypeListener(TypeListenerBinding typeListenerBinding) |
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> scopingAnnotation) |
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) |
static final State NONE
State parent()
<T> BindingImpl<T> getExplicitBinding(Key<T> key)
java.util.Map<Key<?>,Binding<?>> getExplicitBindingsThisLevel()
void putBinding(Key<?> key, BindingImpl<?> binding)
void putProviderLookup(ProviderLookup<?> lookup)
java.util.Set<ProviderLookup<?>> getProviderLookupsThisLevel()
void putStaticInjectionRequest(StaticInjectionRequest staticInjectionRequest)
java.util.Set<StaticInjectionRequest> getStaticInjectionRequestsThisLevel()
ScopeBinding getScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> scopingAnnotation)
void putInjectionRequest(InjectionRequest<?> injectionRequest)
java.util.Set<InjectionRequest<?>> getInjectionRequestsThisLevel()
void putMembersInjectorLookup(MembersInjectorLookup<?> membersInjectorLookup)
java.util.Set<MembersInjectorLookup<?>> getMembersInjectorLookupsThisLevel()
void putScopeBinding(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, ScopeBinding scope)
java.util.Collection<ScopeBinding> getScopeBindingsThisLevel()
void addConverter(TypeConverterBinding typeConverterBinding)
TypeConverterBinding getConverter(java.lang.String stringValue, TypeLiteral<?> type, Errors errors, java.lang.Object source)
type
, or null if none match.java.lang.Iterable<TypeConverterBinding> getConvertersThisLevel()
void addTypeListener(TypeListenerBinding typeListenerBinding)
java.util.List<TypeListenerBinding> getTypeListenerBindings()
java.util.List<TypeListenerBinding> getTypeListenerBindingsThisLevel()
void addProvisionListener(ProvisionListenerBinding provisionListenerBinding)
java.util.List<ProvisionListenerBinding> getProvisionListenerBindings()
java.util.List<ProvisionListenerBinding> getProvisionListenerBindingsThisLevel()
void addScanner(ModuleAnnotatedMethodScannerBinding scanner)
java.util.List<ModuleAnnotatedMethodScannerBinding> getScannerBindings()
java.util.List<ModuleAnnotatedMethodScannerBinding> getScannerBindingsThisLevel()
void blacklist(Key<?> key, State state, java.lang.Object source)
key
. 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.boolean isBlacklisted(Key<?> key)
key
is forbidden from being bound in this injector. This indicates that
one of this injector's descendent's has bound the key.java.util.Set<java.lang.Object> getSourcesForBlacklistedKey(Key<?> key)
java.lang.Object lock()
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,Scope> getScopes()