Interface Provider<T>

All Superinterfaces:
Deconstructable

public interface Provider<T> extends Deconstructable

Provides a component of the parameter type T. If (and only if) dependency injection does not have a component of type T, it will request one from the Provider providing type T.

Providers are useful in these situations:

  • Some code is needed to create the component instance in question.
  • The component creates resources that must be deconstructed.
  • A fallback component should be provided in case the application (or system) does not provide a component instance.
Author:
Tony Vaagenes, gjoranv
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     

    Methods inherited from interface com.yahoo.component.Deconstructable

    deconstruct
  • Method Details

    • get

      T get()