Class Providers
java.lang.Object
org.opensearch.common.inject.util.Providers
Static utility methods for creating and working with instances of
Provider
.- Since:
- 2.0
- Opensearch.internal:
-
Method Summary
-
Method Details
-
of
Returns a provider which always providesinstance
. This should not be necessary to use in your application, but is helpful for several types of unit tests.- Parameters:
instance
- the instance that should always be provided. This is also permitted to be null, to enable aggressive testing, although in real life a Guice-supplied Provider will never return null.
-