Skip to content

Commit 9ea02c6

Browse files
committed
Revised javadoc
1 parent abbe61b commit 9ea02c6

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* 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
243243
throws BeansException;
244244

245245
/**
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}
247247
* type, without creating corresponding bean instances yet.
248248
* <p>Note that this method considers objects created by FactoryBeans, which means
249249
* that FactoryBeans will get initialized in order to determine their object type.
250250
* @param annotationType the type of annotation to look for
251251
* @return the names of all matching beans
252252
* @since 4.0
253+
* @see #findAnnotationOnBean
253254
*/
254255
String[] getBeanNamesForAnnotation(Class<? extends Annotation> annotationType);
255256

256257
/**
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,
258259
* returning a Map of bean names with corresponding bean instances.
259260
* <p>Note that this method considers objects created by FactoryBeans, which means
260261
* 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
263264
* keys and the corresponding bean instances as values
264265
* @throws BeansException if a bean could not be created
265266
* @since 3.0
267+
* @see #findAnnotationOnBean
266268
*/
267269
Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType) throws BeansException;
268270

269271
/**
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.
273275
* @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
275277
* @return the annotation of the given type if found, or {@code null} otherwise
276278
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
277279
* @since 3.0
280+
* @see #getBeanNamesForAnnotation
281+
* @see #getBeansWithAnnotation
278282
*/
279283
@Nullable
280284
<A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)

spring-context/src/main/java/org/springframework/context/annotation/Configuration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -430,7 +430,7 @@
430430
* is registered as a traditional XML bean definition, the name/id of the bean
431431
* element will take precedence.
432432
* @return the explicit component name, if any (or empty String otherwise)
433-
* @see org.springframework.beans.factory.support.DefaultBeanNameGenerator
433+
* @see AnnotationBeanNameGenerator
434434
*/
435435
@AliasFor(annotation = Component.class)
436436
String value() default "";

0 commit comments

Comments
 (0)