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

pack-priv final Class MembersInjectorStore

extends Object
Class Inheritance
Static Imports
com.google.common.collect.ImmutableListMultimap.flatteningToImmutableListMultimap

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

Field Summary

Modifier and TypeField and Description
private final FailableCache<TypeLiteral<?>, MembersInjectorImpl<?>>
private final InjectorImpl
private final ImmutableList<TypeListenerBinding>

Constructor Summary

AccessConstructor and Description
pack-priv
MembersInjectorStore(InjectorImpl injector, List<TypeListenerBinding> typeListenerBindings)

Method Summary

Modifier and TypeMethod and Description
private <T> MembersInjectorImpl<T>
createWithListeners(TypeLiteral<T> type, Errors errors)

Creates a new members injector and attaches both injection listeners and method aspects.

public <T> MembersInjectorImpl<T>
get(TypeLiteral<T> key, Errors errors)

Returns a new complete members injector with injection listeners registered.

pack-priv ImmutableListMultimap<TypeLiteral<?>, InjectionPoint>
pack-priv ImmutableList<SingleMemberInjector>
getInjectors(Set<InjectionPoint> injectionPoints, Errors errors)

Returns the injectors for the specified injection points.

public boolean
hasTypeListeners()

Returns true if any type listeners are installed.

pack-priv boolean
remove(TypeLiteral<?> type)

Purges a type literal from the cache.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private final FailableCache<TypeLiteral<?>, MembersInjectorImpl<?>> cache
injectorback to summary
private final InjectorImpl injector
typeListenerBindingsback to summary
private final ImmutableList<TypeListenerBinding> typeListenerBindings

Constructor Detail

MembersInjectorStoreback to summary
pack-priv MembersInjectorStore(InjectorImpl injector, List<TypeListenerBinding> typeListenerBindings)

Method Detail

createWithListenersback to summary
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.

getback to summary
public <T> MembersInjectorImpl<T> get(TypeLiteral<T> key, Errors errors) throws ErrorsException

Returns a new complete members injector with injection listeners registered.

Annotations
@SuppressWarnings:unchecked
getAllInjectionPointsback to summary
pack-priv ImmutableListMultimap<TypeLiteral<?>, InjectionPoint> getAllInjectionPoints()
getInjectorsback to summary
pack-priv ImmutableList<SingleMemberInjector> getInjectors(Set<InjectionPoint> injectionPoints, Errors errors)

Returns the injectors for the specified injection points.

hasTypeListenersback to summary
public boolean hasTypeListeners()

Returns true if any type listeners are installed. Other code may take shortcuts when there aren't any type listeners.

removeback to summary
pack-priv boolean remove(TypeLiteral<?> type)

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.