Class ProviderMethod<T>
- java.lang.Object
-
- org.elasticsearch.common.inject.internal.ProviderMethod<T>
-
- All Implemented Interfaces:
Provider<T>
,HasDependencies
,ProviderWithDependencies<T>
public class ProviderMethod<T> extends java.lang.Object implements ProviderWithDependencies<T>
A provider that invokes a method and returns its result.
-
-
Method Summary
Modifier and Type Method Description void
configure(Binder binder)
T
get()
Provides an instance ofT
.java.util.Set<Dependency<?>>
getDependencies()
Returns the known dependencies for this type.java.lang.Object
getInstance()
Key<T>
getKey()
java.lang.reflect.Method
getMethod()
-
-
-
Method Detail
-
getMethod
public java.lang.reflect.Method getMethod()
-
getInstance
public java.lang.Object getInstance()
-
configure
public void configure(Binder binder)
-
get
public T get()
Description copied from interface:Provider
Provides an instance ofT
. Must never returnnull
.
-
getDependencies
public java.util.Set<Dependency<?>> getDependencies()
Description copied from interface:HasDependencies
Returns the known dependencies for this type. If this has dependencies whose values are not known statically, a dependency for theInjector
will be included in the returned set.- Specified by:
getDependencies
in interfaceHasDependencies
- Returns:
- a possibly empty set
-
-