Top Description Methods
com.google.inject

public Interface MembersInjector<T>

Known Direct Implementers
com.google.inject.internal.MembersInjectorImpl
Type Parameters
<T>
type to inject members of

Injects dependencies into the fields and methods on instances of type T. Ignores the presence or absence of an injectable constructor.
Authors
[email protected] (Bob Lee), [email protected] (Jesse Wilson)
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public void
injectMembers(T
to inject members on. May be null.
instance
)

Injects dependencies into the fields and methods of instance.

Method Detail

injectMembersback to summary
public void injectMembers(T instance)

Injects dependencies into the fields and methods of 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.

Parameters
instance:T

to inject members on. May be null.