Interface Provider<T>


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

    Modifier and Type
    Method
    Description
    get()
    Provides a fully-constructed and injected instance of T.
  • Method Details

    • get

      T get()
      Provides a fully-constructed and injected instance of T.