com.google.inject.MembersInjector Maven / Gradle / Ivy
package com.google.inject;
/**
* Injects dependencies into the fields and methods on instances of type {@code T}. Ignores the
* presence or absence of an injectable constructor.
*
* @param type to inject members of
*/
public interface MembersInjector {
/**
* Injects dependencies into the fields and methods of {@code 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.
*
* @param instance to inject members on. May be {@code null}.
*/
void injectMembers(T instance);
}