T - the bean-typepublic class SingleBeanDependency<T> extends java.lang.Object implements BeanDependency<T>
BeanDependency to express a dependency on a single bean.BeanDependency.Fulfillment| Constructor and Description |
|---|
SingleBeanDependency(java.lang.Class<? extends T> type)
Creates a new
BeanDependency to a bean of the given type. |
SingleBeanDependency(java.lang.String name,
java.lang.Class<? extends T> type)
Creates a new
BeanDependency to a bean with the given name and of the given type. |
| Modifier and Type | Method and Description |
|---|---|
BeanDependency.Fulfillment |
fulfill(BeansProvider beansProvider)
Tries to fulfill this
BeanDependency with beans from the given BeansProvider and returns
the state of fulfillment. |
T |
get()
Returns the target of this
BeanDependency after it was fulfilled. |
public SingleBeanDependency(java.lang.Class<? extends T> type)
BeanDependency to a bean of the given type.type - the type of the beanpublic SingleBeanDependency(java.lang.String name,
java.lang.Class<? extends T> type)
BeanDependency to a bean with the given name and of the given type.name - the name of the beantype - the type of the beanpublic BeanDependency.Fulfillment fulfill(BeansProvider beansProvider)
BeanDependencyBeanDependency with beans from the given BeansProvider and returns
the state of fulfillment.fulfill in interface BeanDependency<T>beansProvider - the BeansProvider to obtain beans fromBeanDependency.Fulfillmentpublic T get()
BeanDependencyBeanDependency after it was fulfilled.get in interface BeanDependency<T>BeanDependency