Rename SearchStrategy.EXHAUSTIVE to TYPE_HIERARCHY

Rename `SearchStrategy.EXHAUSTIVE` from `MergedAnnotations` to
`SearchStrategy.TYPE_HIERARCHY`

See gh-23378
This commit is contained in:
Phillip Webb
2019-07-31 13:46:25 +01:00
parent e6f86c5c75
commit a6021cc968
13 changed files with 196 additions and 182 deletions

View File

@@ -684,7 +684,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
Class<?> beanType = getType(beanName);
if (beanType != null) {
MergedAnnotation<A> annotation =
MergedAnnotations.from(beanType, SearchStrategy.EXHAUSTIVE).get(annotationType);
MergedAnnotations.from(beanType, SearchStrategy.TYPE_HIERARCHY).get(annotationType);
if (annotation.isPresent()) {
return annotation;
}
@@ -696,7 +696,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
Class<?> beanClass = bd.getBeanClass();
if (beanClass != beanType) {
MergedAnnotation<A> annotation =
MergedAnnotations.from(beanClass, SearchStrategy.EXHAUSTIVE).get(annotationType);
MergedAnnotations.from(beanClass, SearchStrategy.TYPE_HIERARCHY).get(annotationType);
if (annotation.isPresent()) {
return annotation;
}
@@ -706,7 +706,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
Method factoryMethod = bd.getResolvedFactoryMethod();
if (factoryMethod != null) {
MergedAnnotation<A> annotation =
MergedAnnotations.from(factoryMethod, SearchStrategy.EXHAUSTIVE).get(annotationType);
MergedAnnotations.from(factoryMethod, SearchStrategy.TYPE_HIERARCHY).get(annotationType);
if (annotation.isPresent()) {
return annotation;
}