1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2018 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,7 +243,9 @@ <T> Map<String, T> getBeansOfType(Class<T> type, boolean includeNonSingletons, b
243
243
244
244
/**
245
245
* Find all names of beans whose {@code Class} has the supplied {@link Annotation}
246
- * type, without creating any bean instances yet.
246
+ * type, without creating corresponding bean instances yet.
247
+ * <p>Note that this method considers objects created by FactoryBeans, which means
248
+ * that FactoryBeans will get initialized in order to determine their object type.
247
249
* @param annotationType the type of annotation to look for
248
250
* @return the names of all matching beans
249
251
* @since 4.0
@@ -253,6 +255,8 @@ <T> Map<String, T> getBeansOfType(Class<T> type, boolean includeNonSingletons, b
253
255
/**
254
256
* Find all beans whose {@code Class} has the supplied {@link Annotation} type,
255
257
* returning a Map of bean names with corresponding bean instances.
258
+ * <p>Note that this method considers objects created by FactoryBeans, which means
259
+ * that FactoryBeans will get initialized in order to determine their object type.
256
260
* @param annotationType the type of annotation to look for
257
261
* @return a Map with the matching beans, containing the bean names as
258
262
* keys and the corresponding bean instances as values
@@ -267,7 +271,7 @@ <T> Map<String, T> getBeansOfType(Class<T> type, boolean includeNonSingletons, b
267
271
* found on the given class itself.
268
272
* @param beanName the name of the bean to look for annotations on
269
273
* @param annotationType the annotation class to look for
270
- * @return the annotation of the given type if found, or {@code null}
274
+ * @return the annotation of the given type if found, or {@code null} otherwise
271
275
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
272
276
* @since 3.0
273
277
*/
0 commit comments