@Qualifier annotation.
BeanFactoryUtils
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: true if either the bean definition (in the XML case)
or the bean's factory method (in the @Bean case) defines a matching
qualifier value (through <qualifier> or @Qualifier)the qualifier to match qualifier, String the name of the candidate bean beanName, BeanFactory the factory from which to retrieve the named bean beanFactory)Check whether the named bean declares a qualifier of the given name. |
| public static <T> T | Returns: the matching bean of typeT (never null)the factory to get the target bean from (also searching ancestors) beanFactory, Class<T> the type of bean to retrieve beanType, String the qualifier for selecting between multiple bean matches qualifier)Obtain a bean of type |
| private static <T> T | Returns: the matching bean of typeT (never null)the factory to get the target bean from bf, Class<T> the type of bean to retrieve beanType, String the qualifier for selecting between multiple bean matches qualifier)Obtain a bean of type |
| public static <T> Map | Returns: the matching beans of typeTthe factory to get the target beans from (also searching ancestors) beanFactory, Class<T> the type of beans to retrieve beanType, String the qualifier for selecting among all type matches qualifier)Retrieve all beans of type |
| BeanFactoryAnnotationUtils | back to summary |
|---|---|
| public BeanFactoryAnnotationUtils() | |
| isQualifierMatch | back to summary |
|---|---|
| public static boolean isQualifierMatch(Predicate<String> qualifier, String beanName, BeanFactory beanFactory) Check whether the named bean declares a qualifier of the given name.
| |
| qualifiedBeanOfType | back to summary |
|---|---|
| public static <T> T qualifiedBeanOfType(BeanFactory beanFactory, Class<T> beanType, String qualifier) throws BeansException Obtain a bean of type
| |
| qualifiedBeanOfType | back to summary |
|---|---|
| private static <T> T qualifiedBeanOfType(ListableBeanFactory bf, Class<T> beanType, String qualifier) Obtain a bean of type
| |
| qualifiedBeansOfType | back to summary |
|---|---|
| public static <T> Map Retrieve all beans of type
| |