public class BeanFactoryAnnotationUtils extends Object
@Qualifier annotation.BeanFactoryUtils| Constructor and Description |
|---|
BeanFactoryAnnotationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
qualifiedBeanOfType(BeanFactory beanFactory,
Class<T> beanType,
String qualifier)
Obtain a bean of type
T from the given BeanFactory declaring a
qualifier (e.g. |
public static <T> T qualifiedBeanOfType(BeanFactory beanFactory, Class<T> beanType, String qualifier)
T from the given BeanFactory declaring a
qualifier (e.g. via <qualifier> or @Qualifier) matching the given
qualifier, or having a bean name matching the given qualifier.beanFactory - the BeanFactory to get the target bean frombeanType - the type of bean to retrievequalifier - the qualifier for selecting between multiple bean matchesT (never null)NoSuchBeanDefinitionException - if no matching bean of type T found