Top Description Fields Constructors Methods
com.google.inject.internal

pack-priv final Class ConstructorInjectorStore

extends Object
Class Inheritance
Imports
com.google.common.collect.ImmutableList, .Lists, com.google.inject.spi.InjectionPoint, .InterceptorBinding

Constructor injectors by type.
Author
[email protected] (Jesse Wilson)

Field Summary

Modifier and TypeField and Description
private final FailableCache<InjectionPoint, ConstructorInjector<?>>
private final InjectorImpl

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private <T> ConstructorInjector<T>
createConstructor(InjectionPoint injectionPoint, Errors errors)

public ConstructorInjector<?>
get(InjectionPoint constructorInjector, Errors errors)

Returns a new complete constructor injector with injection listeners registered.

pack-priv boolean
isLoading(InjectionPoint ip)

Returns true if the store is in the process of loading this injection point.

pack-priv boolean
remove(InjectionPoint ip)

Purges an injection point from the cache.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private final FailableCache<InjectionPoint, ConstructorInjector<?>> cache
injectorback to summary
private final InjectorImpl injector

Constructor Detail

ConstructorInjectorStoreback to summary
pack-priv ConstructorInjectorStore(InjectorImpl injector)

Method Detail

createConstructorback to summary
private <T> ConstructorInjector<T> createConstructor(InjectionPoint injectionPoint, Errors errors) throws ErrorsException
getback to summary
public ConstructorInjector<?> get(InjectionPoint constructorInjector, Errors errors) throws ErrorsException

Returns a new complete constructor injector with injection listeners registered.

isLoadingback to summary
pack-priv boolean isLoading(InjectionPoint ip)

Returns true if the store is in the process of loading this injection point.

removeback to summary
pack-priv 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.