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 Object implements ProviderWithDependencies<T>
A provider that invokes a method and returns its result.- Author:
- jessewilson@google.com (Jesse Wilson)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Binder binder)Tget()Provides an instance ofT.Set<Dependency<?>>getDependencies()Returns the known dependencies for this type.ObjectgetInstance()Key<T>getKey()MethodgetMethod()
-
-
-
Method Detail
-
getMethod
public Method getMethod()
-
getInstance
public Object getInstance()
-
configure
public void configure(Binder binder)
-
get
public T get()
Description copied from interface:ProviderProvides an instance ofT. Must never returnnull.
-
getDependencies
public Set<Dependency<?>> getDependencies()
Description copied from interface:HasDependenciesReturns the known dependencies for this type. If this has dependencies whose values are not known statically, a dependency for theInjectorwill be included in the returned set.- Specified by:
getDependenciesin interfaceHasDependencies- Returns:
- a possibly empty set
-
-