final class MembersInjectorImpl<T> extends java.lang.Object implements MembersInjector<T>
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableList<MethodAspect> |
addedAspects |
private com.google.common.collect.ImmutableSet<InjectionListener<? super T>> |
injectionListeners |
private InjectorImpl |
injector |
private com.google.common.collect.ImmutableList<SingleMemberInjector> |
memberInjectors |
private TypeLiteral<T> |
typeLiteral |
private com.google.common.collect.ImmutableSet<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.ImmutableList<MethodAspect> |
getAddedAspects() |
com.google.common.collect.ImmutableSet<InjectionPoint> |
getInjectionPoints() |
com.google.common.collect.ImmutableList<SingleMemberInjector> |
getMemberInjectors() |
(package private) void |
injectAndNotify(T instance,
Errors errors,
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,
Errors errors,
InternalContext context,
boolean toolableOnly) |
(package private) void |
notifyListeners(T instance,
Errors errors) |
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.ImmutableSet<MembersInjector<? super T>> userMembersInjectors
private final com.google.common.collect.ImmutableSet<InjectionListener<? super T>> injectionListeners
private final com.google.common.collect.ImmutableList<MethodAspect> addedAspects
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, Errors errors, Key<T> key, ProvisionListenerStackCallback<T> provisionCallback, java.lang.Object source, boolean toolableOnly) throws ErrorsException
ErrorsException
void notifyListeners(T instance, Errors errors) throws ErrorsException
ErrorsException
void injectMembers(T t, Errors errors, InternalContext context, boolean toolableOnly)
public java.lang.String toString()
toString
in class java.lang.Object
public com.google.common.collect.ImmutableSet<InjectionPoint> getInjectionPoints()
public com.google.common.collect.ImmutableList<MethodAspect> getAddedAspects()