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.
  • Method Details

    • getKey

      public Key<T> getKey()
    • getMethod

      public Method getMethod()
    • getInstance

      public Object getInstance()
    • configure

      public void configure(Binder binder)
    • get

      public T get()
      Description copied from interface: Provider
      Provides an instance of T. Must never return null.
      Specified by:
      get in interface Provider<T>
    • getDependencies

      public 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 the Injector will be included in the returned set.
      Specified by:
      getDependencies in interface HasDependencies
      Returns:
      a possibly empty set