1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -243,18 +243,19 @@ <T> Map<String, T> getBeansOfType(@Nullable Class<T> type, boolean includeNonSin
243
243
throws BeansException ;
244
244
245
245
/**
246
- * Find all names of beans whose {@code Class} has the supplied {@link Annotation}
246
+ * Find all names of beans which are annotated with the supplied {@link Annotation}
247
247
* type, without creating corresponding bean instances yet.
248
248
* <p>Note that this method considers objects created by FactoryBeans, which means
249
249
* that FactoryBeans will get initialized in order to determine their object type.
250
250
* @param annotationType the type of annotation to look for
251
251
* @return the names of all matching beans
252
252
* @since 4.0
253
+ * @see #findAnnotationOnBean
253
254
*/
254
255
String [] getBeanNamesForAnnotation (Class <? extends Annotation > annotationType );
255
256
256
257
/**
257
- * Find all beans whose {@code Class} has the supplied {@link Annotation} type,
258
+ * Find all beans which are annotated with the supplied {@link Annotation} type,
258
259
* returning a Map of bean names with corresponding bean instances.
259
260
* <p>Note that this method considers objects created by FactoryBeans, which means
260
261
* that FactoryBeans will get initialized in order to determine their object type.
@@ -263,18 +264,21 @@ <T> Map<String, T> getBeansOfType(@Nullable Class<T> type, boolean includeNonSin
263
264
* keys and the corresponding bean instances as values
264
265
* @throws BeansException if a bean could not be created
265
266
* @since 3.0
267
+ * @see #findAnnotationOnBean
266
268
*/
267
269
Map <String , Object > getBeansWithAnnotation (Class <? extends Annotation > annotationType ) throws BeansException ;
268
270
269
271
/**
270
- * Find an {@link Annotation} of {@code annotationType} on the specified
271
- * bean, traversing its interfaces and super classes if no annotation can be
272
- * found on the given class itself.
272
+ * Find an {@link Annotation} of {@code annotationType} on the specified bean,
273
+ * traversing its interfaces and super classes if no annotation can be found on
274
+ * the given class itself.
273
275
* @param beanName the name of the bean to look for annotations on
274
- * @param annotationType the annotation class to look for
276
+ * @param annotationType the type of annotation to look for
275
277
* @return the annotation of the given type if found, or {@code null} otherwise
276
278
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
277
279
* @since 3.0
280
+ * @see #getBeanNamesForAnnotation
281
+ * @see #getBeansWithAnnotation
278
282
*/
279
283
@ Nullable
280
284
<A extends Annotation > A findAnnotationOnBean (String beanName , Class <A > annotationType )
0 commit comments