Package com.google.inject.internal
Class MembersInjectorStore
java.lang.Object
com.google.inject.internal.MembersInjectorStore
Members injectors by type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FailableCache<TypeLiteral<?>,
MembersInjectorImpl<?>> private final InjectorImpl
private final com.google.common.collect.ImmutableList<TypeListenerBinding>
-
Constructor Summary
ConstructorsConstructorDescriptionMembersInjectorStore
(InjectorImpl injector, List<TypeListenerBinding> typeListenerBindings) -
Method Summary
Modifier and TypeMethodDescriptionprivate <T> MembersInjectorImpl<T>
createWithListeners
(TypeLiteral<T> type, Errors errors) Creates a new members injector and attaches both injection listeners and method aspects.<T> MembersInjectorImpl<T>
get
(TypeLiteral<T> key, Errors errors) Returns a new complete members injector with injection listeners registered.(package private) com.google.common.collect.ImmutableListMultimap<TypeLiteral<?>,
InjectionPoint> (package private) com.google.common.collect.ImmutableList<SingleMemberInjector>
getInjectors
(Set<InjectionPoint> injectionPoints, Errors errors) Returns the injectors for the specified injection points.boolean
Returns true if any type listeners are installed.(package private) boolean
remove
(TypeLiteral<?> type) Purges a type literal from the cache.
-
Field Details
-
injector
-
typeListenerBindings
-
cache
-
-
Constructor Details
-
MembersInjectorStore
MembersInjectorStore(InjectorImpl injector, List<TypeListenerBinding> typeListenerBindings)
-
-
Method Details
-
hasTypeListeners
public boolean hasTypeListeners()Returns true if any type listeners are installed. Other code may take shortcuts when there aren't any type listeners. -
get
Returns a new complete members injector with injection listeners registered.- Throws:
ErrorsException
-
remove
Purges a type literal from the cache. Use this only if the type is not actually valid for binding and needs to be purged. (See issue 319 and ImplicitBindingTest#testCircularJitBindingsLeaveNoResidue and #testInstancesRequestingProvidersForThemselvesWithChildInjectors for examples of when this is necessary.)Returns true if the type was stored in the cache, false otherwise.
-
createWithListeners
private <T> MembersInjectorImpl<T> createWithListeners(TypeLiteral<T> type, Errors errors) throws ErrorsException Creates a new members injector and attaches both injection listeners and method aspects.- Throws:
ErrorsException
-
getInjectors
com.google.common.collect.ImmutableList<SingleMemberInjector> getInjectors(Set<InjectionPoint> injectionPoints, Errors errors) Returns the injectors for the specified injection points. -
getAllInjectionPoints
com.google.common.collect.ImmutableListMultimap<TypeLiteral<?>,InjectionPoint> getAllInjectionPoints()
-