Introduced getBeanNamesForAnnotation method on ListableBeanFactory

Issue: SPR-11069
This commit is contained in:
Juergen Hoeller
2013-11-15 16:04:11 +01:00
parent b43901ed86
commit 54571bf038
6 changed files with 78 additions and 9 deletions

View File

@@ -238,6 +238,11 @@ class StubWebApplicationContext implements WebApplicationContext {
return this.beanFactory.getBeansOfType(type, includeNonSingletons, allowEagerInit);
}
@Override
public String[] getBeanNamesForAnnotation(Class<? extends Annotation> annotationType) {
return this.beanFactory.getBeanNamesForAnnotation(annotationType);
}
@Override
public Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType)
throws BeansException {
@@ -246,7 +251,9 @@ class StubWebApplicationContext implements WebApplicationContext {
}
@Override
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType) {
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
throws NoSuchBeanDefinitionException{
return this.beanFactory.findAnnotationOnBean(beanName, annotationType);
}