Top Description Methods
com.google.inject.spi

public Interface ProvidesMethodBinding<T>

extends HasDependencies
Known Direct Implementers
com.google.inject.internal.ProviderMethod
Imports
com.google.inject.Key, .Provides, java.lang.annotation.Annotation, java.lang.reflect.Method

An @Provides binding or binding produced by a ModuleAnnotatedMethodScanner.
Author
[email protected] (Sam Berlin)
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Annotation
getAnnotation()

Returns the annotation that caused this binding to be created.

public Object
getEnclosingInstance()

Returns the instance of the object the method is defined in.

public Key<T>
getKey()

Returns the key of the binding.

public Method
getMethod()

Returns the method this binding uses.

Inherited from com.google.inject.spi.HasDependencies:
getDependencies

Method Detail

getAnnotationback to summary
public Annotation getAnnotation()

Returns the annotation that caused this binding to be created. For @Provides methods, this is an instance of the @Provides annotation. For bindings from ModuleAnnotatedMethodScanner, this is the annotation that caused the scanner to produce the binding.

getEnclosingInstanceback to summary
public Object getEnclosingInstance()

Returns the instance of the object the method is defined in.

getKeyback to summary
public Key<T> getKey()

Returns the key of the binding.

getMethodback to summary
public Method getMethod()

Returns the method this binding uses.