final class MembersInjectorImpl<T> extends java.lang.Object implements MembersInjector<T>
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableList<InjectionListener<? super T>> |
injectionListeners |
private InjectorImpl |
injector |
private com.google.common.collect.ImmutableList<SingleMemberInjector> |
memberInjectors |
private TypeLiteral<T> |
typeLiteral |
private com.google.common.collect.ImmutableList<MembersInjector<? super T>> |
userMembersInjectors |
Constructor and Description |
---|
MembersInjectorImpl(InjectorImpl injector,
TypeLiteral<T> typeLiteral,
EncounterImpl<T> encounter,
com.google.common.collect.ImmutableList<SingleMemberInjector> memberInjectors) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<InjectionPoint> |
getInjectionPoints() |
com.google.common.collect.ImmutableList<SingleMemberInjector> |
getMemberInjectors() |
(package private) void |
injectAndNotify(T instance,
Key<T> key,
ProvisionListenerStackCallback<T> provisionCallback,
java.lang.Object source,
boolean toolableOnly) |
void |
injectMembers(T instance)
Injects dependencies into the fields and methods of
instance . |
(package private) void |
injectMembers(T t,
InternalContext context,
boolean toolableOnly) |
(package private) void |
notifyListeners(T instance) |
java.lang.String |
toString() |
private final TypeLiteral<T> typeLiteral
private final InjectorImpl injector
private final com.google.common.collect.ImmutableList<SingleMemberInjector> memberInjectors
private final com.google.common.collect.ImmutableList<MembersInjector<? super T>> userMembersInjectors
private final com.google.common.collect.ImmutableList<InjectionListener<? super T>> injectionListeners
MembersInjectorImpl(InjectorImpl injector, TypeLiteral<T> typeLiteral, EncounterImpl<T> encounter, com.google.common.collect.ImmutableList<SingleMemberInjector> memberInjectors)
public com.google.common.collect.ImmutableList<SingleMemberInjector> getMemberInjectors()
public void injectMembers(T instance)
MembersInjector
instance
. Ignores the presence or
absence of an injectable constructor.
Whenever Guice creates an instance, it performs this injection automatically (after first performing constructor injection), so if you're able to let Guice create all your objects for you, you'll never need to use this method.
injectMembers
in interface MembersInjector<T>
instance
- to inject members on. May be null
.void injectAndNotify(T instance, Key<T> key, ProvisionListenerStackCallback<T> provisionCallback, java.lang.Object source, boolean toolableOnly) throws InternalProvisionException
InternalProvisionException
void notifyListeners(T instance) throws InternalProvisionException
InternalProvisionException
void injectMembers(T t, InternalContext context, boolean toolableOnly) throws InternalProvisionException
InternalProvisionException
public java.lang.String toString()
toString
in class java.lang.Object
public com.google.common.collect.ImmutableSet<InjectionPoint> getInjectionPoints()