Interface Provider<T>
-
public interface Provider<T>
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deconstruct()
T
get()
-
-
-
Method Detail
-
get
T get()
-
deconstruct
void deconstruct()
-
-