|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.elasticsearch.common.inject.util.Providers
public final class Providers
Static utility methods for creating and working with instances of
Provider
.
Method Summary | ||
---|---|---|
static
|
of(T instance)
Returns a provider which always provides instance . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Provider<T> of(T instance)
instance
. This should not
be necessary to use in your application, but is helpful for several types
of unit tests.
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |