Package com.google.inject.internal
Class ConstructorInjectorStore
- java.lang.Object
-
- com.google.inject.internal.ConstructorInjectorStore
-
final class ConstructorInjectorStore extends java.lang.Object
Constructor injectors by type.
-
-
Field Summary
Fields Modifier and Type Field Description private FailableCache<InjectionPoint,ConstructorInjector<?>>
cache
private InjectorImpl
injector
-
Constructor Summary
Constructors Constructor Description ConstructorInjectorStore(InjectorImpl injector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private <T> ConstructorInjector<T>
createConstructor(InjectionPoint injectionPoint, Errors errors)
ConstructorInjector<?>
get(InjectionPoint constructorInjector, Errors errors)
Returns a new complete constructor injector with injection listeners registered.(package private) boolean
remove(InjectionPoint ip)
Purges an injection point from the cache.
-
-
-
Field Detail
-
injector
private final InjectorImpl injector
-
cache
private final FailableCache<InjectionPoint,ConstructorInjector<?>> cache
-
-
Constructor Detail
-
ConstructorInjectorStore
ConstructorInjectorStore(InjectorImpl injector)
-
-
Method Detail
-
get
public ConstructorInjector<?> get(InjectionPoint constructorInjector, Errors errors) throws ErrorsException
Returns a new complete constructor injector with injection listeners registered.- Throws:
ErrorsException
-
remove
boolean remove(InjectionPoint ip)
Purges an injection point from the cache. Use this only if the cache is not actually valid and needs to be purged. (See issue 319 and ImplicitBindingTest#testCircularJitBindingsLeaveNoResidue and #testInstancesRequestingProvidersForThemselvesWithChildInjectors for examples of when this is necessary.)Returns true if the injector for that point was stored in the cache, false otherwise.
-
createConstructor
private <T> ConstructorInjector<T> createConstructor(InjectionPoint injectionPoint, Errors errors) throws ErrorsException
- Throws:
ErrorsException
-
-