Interface ProviderFactory
A factory for creating instances of
Provider.
An instance of the factory can be injected into a task, plugin or other object by annotating a public constructor or property getter method with javax.inject.Inject. It is also available via Project.getProviders().
- Since:
- 4.0
-
Method Summary
-
Method Details
-
provider
Creates aProviderwhose value is calculated using the givenCallable.The provider is live and will call the
Callableeach time its value is queried. TheCallablemay returnnull, in which case the provider is considered to have no value.- Parameters:
value- Thejava.util.concurrent.Callableuse to calculate the value.- Returns:
- The provider. Never returns null.
-