Rename MergedAnnotations.SearchStrategy.SUPER_CLASS to SUPERCLASS
For consistency within the framework, this commit renames the SUPER_CLASS enum constant to SUPERCLASS. See gh-21697
This commit is contained in:
@@ -376,7 +376,7 @@ public abstract class AnnotationUtils {
|
||||
RepeatableContainers repeatableContainers = (containerAnnotationType != null ?
|
||||
RepeatableContainers.of(annotationType, containerAnnotationType) :
|
||||
RepeatableContainers.standardRepeatables());
|
||||
return MergedAnnotations.from(annotatedElement, SearchStrategy.SUPER_CLASS,
|
||||
return MergedAnnotations.from(annotatedElement, SearchStrategy.SUPERCLASS,
|
||||
repeatableContainers, AnnotationFilter.PLAIN)
|
||||
.stream(annotationType)
|
||||
.filter(MergedAnnotationPredicates.firstRunOf(MergedAnnotation::getAggregateIndex))
|
||||
@@ -600,7 +600,7 @@ public abstract class AnnotationUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (Class<?>) MergedAnnotations.from(clazz, SearchStrategy.SUPER_CLASS)
|
||||
return (Class<?>) MergedAnnotations.from(clazz, SearchStrategy.SUPERCLASS)
|
||||
.get(annotationType, MergedAnnotation::isDirectlyPresent)
|
||||
.getSource();
|
||||
}
|
||||
@@ -637,7 +637,7 @@ public abstract class AnnotationUtils {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (Class<?>) MergedAnnotations.from(clazz, SearchStrategy.SUPER_CLASS)
|
||||
return (Class<?>) MergedAnnotations.from(clazz, SearchStrategy.SUPERCLASS)
|
||||
.stream()
|
||||
.filter(MergedAnnotationPredicates.typeIn(annotationTypes).and(MergedAnnotation::isDirectlyPresent))
|
||||
.map(MergedAnnotation::getSource)
|
||||
|
||||
@@ -121,7 +121,7 @@ abstract class AnnotationsScanner {
|
||||
return processElement(context, source, processor, classFilter);
|
||||
case INHERITED_ANNOTATIONS:
|
||||
return processClassInheritedAnnotations(context, source, processor, classFilter);
|
||||
case SUPER_CLASS:
|
||||
case SUPERCLASS:
|
||||
return processClassHierarchy(context, new int[] {0}, source, processor, classFilter, false);
|
||||
case EXHAUSTIVE:
|
||||
return processClassHierarchy(context, new int[] {0}, source, processor, classFilter, true);
|
||||
@@ -229,7 +229,7 @@ abstract class AnnotationsScanner {
|
||||
case DIRECT:
|
||||
case INHERITED_ANNOTATIONS:
|
||||
return processMethodInheritedAnnotations(context, source, processor, classFilter);
|
||||
case SUPER_CLASS:
|
||||
case SUPERCLASS:
|
||||
return processMethodHierarchy(context, new int[] {0}, source.getDeclaringClass(),
|
||||
processor, classFilter, source, false);
|
||||
case EXHAUSTIVE:
|
||||
|
||||
@@ -118,6 +118,7 @@ import org.springframework.lang.Nullable;
|
||||
* </pre>
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Sam Brannen
|
||||
* @since 5.2
|
||||
* @see MergedAnnotation
|
||||
* @see MergedAnnotationCollectors
|
||||
@@ -372,31 +373,31 @@ public interface MergedAnnotations extends Iterable<MergedAnnotation<Annotation>
|
||||
/**
|
||||
* Find only directly declared annotations, without considering
|
||||
* {@link Inherited @Inherited} annotations and without searching
|
||||
* super-classes or implemented interfaces.
|
||||
* superclasses or implemented interfaces.
|
||||
*/
|
||||
DIRECT,
|
||||
|
||||
/**
|
||||
* Find all directly declared annotations as well any
|
||||
* {@link Inherited @Inherited} super-class annotations. This strategy
|
||||
* Find all directly declared annotations as well as any
|
||||
* {@link Inherited @Inherited} superclass annotations. This strategy
|
||||
* is only really useful when used with {@link Class} types since the
|
||||
* {@link Inherited @Inherited} annotation is ignored for all other
|
||||
* {@link AnnotatedElement annotated elements}. This strategy does not
|
||||
* search implemented interfaces.
|
||||
* {@linkplain AnnotatedElement annotated elements}. This strategy does
|
||||
* not search implemented interfaces.
|
||||
*/
|
||||
INHERITED_ANNOTATIONS,
|
||||
|
||||
/**
|
||||
* Find all directly declared and super-class annotations. This strategy
|
||||
* Find all directly declared and superclass annotations. This strategy
|
||||
* is similar to {@link #INHERITED_ANNOTATIONS} except the annotations
|
||||
* do not need to be meta-annotated with {@link Inherited @Inherited}.
|
||||
* This strategy does not search implemented interfaces.
|
||||
*/
|
||||
SUPER_CLASS,
|
||||
SUPERCLASS,
|
||||
|
||||
/**
|
||||
* Perform a full search of all related elements, include those on any
|
||||
* super-classes or implemented interfaces. Superclass annotations do
|
||||
* Perform a full search of all related elements, including those on any
|
||||
* superclasses or implemented interfaces. Superclass annotations do
|
||||
* not need to be meta-annotated with {@link Inherited @Inherited}.
|
||||
*/
|
||||
EXHAUSTIVE
|
||||
|
||||
Reference in New Issue
Block a user