org.elasticsearch.common.inject.internal
Class ProviderMethod<T>

java.lang.Object
  extended by 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
 void configure(Binder binder)
           
 T get()
          Provides an instance of T.
 Set<Dependency<?>> getDependencies()
          Returns the known dependencies for this type.
 Object getInstance()
           
 Key<T> getKey()
           
 Method getMethod()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright © 2009-2012. All Rights Reserved.