public abstract class ProviderMethod<T> extends Objectimplements ProviderWithExtensionVisitor <T>, HasDependencies , ProvidesMethodBinding <T>
| Modifier and Type | Field and Description |
|---|---|
protected Object |
instance
|
protected Method |
method
|
| Modifier and Type | Method and Description |
|---|---|
<B |
acceptExtensionVisitor(BindingTargetVisitor
Instructs the extension determine if the visitor is an instance of a custom extension visitor, and if so, visit it using that method.
|
void |
configure(Binder
|
boolean |
equals(Object
|
T |
get()
Provides an instance of
T.
|
Annotation |
getAnnotation()
Returns the annotation that caused this binding to be created.
|
Set |
getDependencies()
Returns the known dependencies for this type.
|
Object |
getEnclosingInstance()
Returns the instance of the object the method is defined in.
|
Object |
getInstance()
|
Key |
getKey()
Returns the key of the binding.
|
Method |
getMethod()
Returns the method this binding uses.
|
int |
hashCode()
|
String |
toString()
|
public Key<T> getKey()
ProvidesMethodBinding
public MethodgetMethod()
ProvidesMethodBinding
public ObjectgetInstance()
public ObjectgetEnclosingInstance()
ProvidesMethodBinding
public AnnotationgetAnnotation()
ProvidesMethodBinding
@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.
public void configure(Binderbinder)
public T get()
Provider
T. Must never return
null.
public Set<Dependency <?>> getDependencies()
HasDependencies
Injector will be included in the returned set.
getDependencies in interface
HasDependencies
public <B,V> V acceptExtensionVisitor(BindingTargetVisitor <B ,V> visitor, ProviderInstanceBinding <? extends B> binding)
ProviderWithExtensionVisitor
Due to issues with generics, the type parameters of this method do not relate to the type of the provider. In practice, the 'B' type will always be a supertype of 'T'.
public StringtoString()
public boolean equals(Objectobj)
public int hashCode()