Package com.google.inject.internal
Class InheritingState
java.lang.Object
com.google.inject.internal.InheritingState
- All Implemented Interfaces:
State
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final WeakKeySetprivate final List<TypeConverterBinding>private final Set<InjectionRequest<?>>private final Objectprivate final Set<MembersInjectorLookup<?>>private final Stateprivate final Set<ProviderLookup<?>>private final List<ProvisionListenerBinding>private final List<ModuleAnnotatedMethodScannerBinding>private final Map<Class<? extends Annotation>,ScopeBinding> private final Set<StaticInjectionRequest>private final List<TypeListenerBinding> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConverter(TypeConverterBinding typeConverterBinding) voidaddProvisionListener(ProvisionListenerBinding listenerBinding) voidvoidaddTypeListener(TypeListenerBinding listenerBinding) voidForbids the corresponding injector from creating a binding tokey.getConverter(String stringValue, TypeLiteral<?> type, Errors errors, Object source) Returns the matching converter fortype, or null if none match.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.Returns the explicit bindings at this level only.Set<InjectionRequest<?>>Set<ProviderLookup<?>>getScopeBinding(Class<? extends Annotation> annotationType) Map<Class<? extends Annotation>,Scope> Returns all the scope bindings at this level and parent levels.getSourcesForBlacklistedKey(Key<?> key) Returns the source of a blacklisted key.booleanisBlacklisted(Key<?> key) Returns true ifkeyis forbidden from being bound in this injector.lock()Returns the shared lock for all injector data.parent()voidputBinding(Key<?> key, BindingImpl<?> binding) voidputInjectionRequest(InjectionRequest<?> injectionRequest) voidputMembersInjectorLookup(MembersInjectorLookup<?> membersInjectorLookup) voidputProviderLookup(ProviderLookup<?> lookup) voidputScopeBinding(Class<? extends Annotation> annotationType, ScopeBinding scope) voidputStaticInjectionRequest(StaticInjectionRequest staticInjectionRequest)
-
Field Details
-
parent
-
explicitBindingsMutable
-
explicitBindings
-
scopes
-
providerLookups
-
staticInjectionRequests
-
membersInjectorLookups
-
injectionRequests
-
converters
-
typeListenerBindings
-
provisionListenerBindings
-
scannerBindings
-
blacklistedKeys
-
lock
-
-
Constructor Details
-
InheritingState
InheritingState(State parent)
-
-
Method Details
-
parent
-
getExplicitBinding
Description copied from interface:StateGets a binding which was specified explicitly in a module, or null.- Specified by:
getExplicitBindingin interfaceState
-
getExplicitBindingsThisLevel
Description copied from interface:StateReturns the explicit bindings at this level only.- Specified by:
getExplicitBindingsThisLevelin interfaceState
-
putBinding
- Specified by:
putBindingin interfaceState
-
putProviderLookup
- Specified by:
putProviderLookupin interfaceState
-
getProviderLookupsThisLevel
- Specified by:
getProviderLookupsThisLevelin interfaceState
-
putStaticInjectionRequest
- Specified by:
putStaticInjectionRequestin interfaceState
-
getStaticInjectionRequestsThisLevel
- Specified by:
getStaticInjectionRequestsThisLevelin interfaceState
-
putInjectionRequest
- Specified by:
putInjectionRequestin interfaceState
-
getInjectionRequestsThisLevel
- Specified by:
getInjectionRequestsThisLevelin interfaceState
-
putMembersInjectorLookup
- Specified by:
putMembersInjectorLookupin interfaceState
-
getMembersInjectorLookupsThisLevel
- Specified by:
getMembersInjectorLookupsThisLevelin interfaceState
-
getScopeBinding
- Specified by:
getScopeBindingin interfaceState
-
putScopeBinding
- Specified by:
putScopeBindingin interfaceState
-
getScopeBindingsThisLevel
- Specified by:
getScopeBindingsThisLevelin interfaceState
-
getConvertersThisLevel
Description copied from interface:StateReturns all converters at this level only.- Specified by:
getConvertersThisLevelin interfaceState
-
addConverter
- Specified by:
addConverterin interfaceState
-
getConverter
public TypeConverterBinding getConverter(String stringValue, TypeLiteral<?> type, Errors errors, Object source) Description copied from interface:StateReturns the matching converter fortype, or null if none match.- Specified by:
getConverterin interfaceState
-
addTypeListener
- Specified by:
addTypeListenerin interfaceState
-
getTypeListenerBindings
- Specified by:
getTypeListenerBindingsin interfaceState
-
getTypeListenerBindingsThisLevel
- Specified by:
getTypeListenerBindingsThisLevelin interfaceState
-
addProvisionListener
- Specified by:
addProvisionListenerin interfaceState
-
getProvisionListenerBindings
- Specified by:
getProvisionListenerBindingsin interfaceState
-
getProvisionListenerBindingsThisLevel
- Specified by:
getProvisionListenerBindingsThisLevelin interfaceState
-
addScanner
- Specified by:
addScannerin interfaceState
-
getScannerBindings
- Specified by:
getScannerBindingsin interfaceState
-
getScannerBindingsThisLevel
- Specified by:
getScannerBindingsThisLevelin interfaceState
-
blacklist
Description copied from interface:StateForbids the corresponding injector from creating a binding tokey. 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. -
isBlacklisted
Description copied from interface:StateReturns true ifkeyis forbidden from being bound in this injector. This indicates that one of this injector's descendent's has bound the key.- Specified by:
isBlacklistedin interfaceState
-
getSourcesForBlacklistedKey
Description copied from interface:StateReturns the source of a blacklisted key.- Specified by:
getSourcesForBlacklistedKeyin interfaceState
-
lock
Description copied from interface:StateReturns the shared lock for all injector data. This is a low-granularity, high-contention lock to be used when reading mutable data (ie. just-in-time bindings, and binding blacklists). -
getScopes
Description copied from interface:StateReturns all the scope bindings at this level and parent levels.
-