public interface Provider<T>
Provides instances of
T.
For any type T that can be injected, you can also inject Provider<T>.
Compared to injecting T directly, injecting Provider<T> enables:
- retrieving multiple instances.
- lazy or optional retrieval of an instance.
-
Method Summary
-
Method Details
-
get
T get()Provides a fully-constructed and injected instance ofT.
-