code: public Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType) {
          Map<String, Object> results = new LinkedHashMap<String, Object>();
          for (String beanName : beanFactory.getBeanNamesForType(Object.class)) {
              if (findAnnotationOnBean(beanName, annotationType) != null) {
                  results.put(beanName, beanFactory.getBean(beanName));
              }
          }
          return results;
      }
docs: Find all beans whose <code>Class</code> has the supplied {@link Annotation} type.
  @param annotationType the type of annotation to look for
  @return a Map with the matching beans, containing the bean names as
  keys and the corresponding bean instances as values