public class AnnotatedDependencySource extends java.lang.Object implements DependencySource
Resolves dependencies by scanning object methods. For a method to be eligible to be picked up, it must be compliant with the following conditions:
ValueProvider
annotationThe first method that matches these requirements is called to retrieve the dependency value.
ValueProvider
Constructor and Description |
---|
AnnotatedDependencySource(java.lang.Object source) |
Modifier and Type | Method and Description |
---|---|
<T> java.lang.Object |
resolve(java.lang.Class<T> dependency)
Resolves given dependency (if possible).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPriority, injectRecursively
public AnnotatedDependencySource(java.lang.Object source)
public <T> java.lang.Object resolve(java.lang.Class<T> dependency)
DependencySource
resolve
in interface DependencySource
T
- the type to resolvedependency
- The class of the dependency to resolve