|
|
|
@ -443,12 +443,12 @@ public class AnnotatedElementUtils { |
|
|
|
* @param annotationType the annotation type to find (never {@code null}) |
|
|
|
* @param annotationType the annotation type to find (never {@code null}) |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* or an empty set if none were found |
|
|
|
* or an empty set if none were found |
|
|
|
|
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
|
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
* @since 4.3 |
|
|
|
* @since 4.3 |
|
|
|
* @see #getMergedAnnotation(AnnotatedElement, Class) |
|
|
|
* @see #getMergedAnnotation(AnnotatedElement, Class) |
|
|
|
* @see #getAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
* @see #getAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
* @see #getMergedRepeatableAnnotations(AnnotatedElement, Class, Class) |
|
|
|
* @see #getMergedRepeatableAnnotations(AnnotatedElement, Class, Class) |
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
|
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static <A extends Annotation> Set<A> getMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
public static <A extends Annotation> Set<A> getMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
Class<A> annotationType) { |
|
|
|
Class<A> annotationType) { |
|
|
|
@ -474,13 +474,13 @@ public class AnnotatedElementUtils { |
|
|
|
* {@link java.lang.annotation.Repeatable} |
|
|
|
* {@link java.lang.annotation.Repeatable} |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* or an empty set if none were found |
|
|
|
* or an empty set if none were found |
|
|
|
* @since 4.3 |
|
|
|
|
|
|
|
* @see #getMergedAnnotation(AnnotatedElement, Class) |
|
|
|
|
|
|
|
* @see #getAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
|
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
* @throws AnnotationConfigurationException if the supplied {@code containerType} |
|
|
|
* @throws AnnotationConfigurationException if the supplied {@code containerType} |
|
|
|
* is not a valid container annotation for the supplied {@code annotationType} |
|
|
|
* is not a valid container annotation for the supplied {@code annotationType} |
|
|
|
|
|
|
|
* @since 4.3 |
|
|
|
|
|
|
|
* @see #getMergedAnnotation(AnnotatedElement, Class) |
|
|
|
|
|
|
|
* @see #getAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static <A extends Annotation> Set<A> getMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
public static <A extends Annotation> Set<A> getMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerType) { |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerType) { |
|
|
|
@ -729,12 +729,12 @@ public class AnnotatedElementUtils { |
|
|
|
* @param annotationType the annotation type to find (never {@code null}) |
|
|
|
* @param annotationType the annotation type to find (never {@code null}) |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* or an empty set if none were found |
|
|
|
* or an empty set if none were found |
|
|
|
|
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
|
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
* @since 4.3 |
|
|
|
* @since 4.3 |
|
|
|
* @see #findMergedAnnotation(AnnotatedElement, Class) |
|
|
|
* @see #findMergedAnnotation(AnnotatedElement, Class) |
|
|
|
* @see #findAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
* @see #findAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
* @see #findMergedRepeatableAnnotations(AnnotatedElement, Class, Class) |
|
|
|
* @see #findMergedRepeatableAnnotations(AnnotatedElement, Class, Class) |
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
|
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static <A extends Annotation> Set<A> findMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
public static <A extends Annotation> Set<A> findMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
Class<A> annotationType) { |
|
|
|
Class<A> annotationType) { |
|
|
|
@ -760,13 +760,13 @@ public class AnnotatedElementUtils { |
|
|
|
* {@link java.lang.annotation.Repeatable} |
|
|
|
* {@link java.lang.annotation.Repeatable} |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* @return the set of all merged repeatable {@code Annotations} found, |
|
|
|
* or an empty set if none were found |
|
|
|
* or an empty set if none were found |
|
|
|
* @since 4.3 |
|
|
|
|
|
|
|
* @see #findMergedAnnotation(AnnotatedElement, Class) |
|
|
|
|
|
|
|
* @see #findAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
|
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
* @throws IllegalArgumentException if the {@code element} or {@code annotationType} |
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
* is {@code null}, or if the container type cannot be resolved |
|
|
|
* @throws AnnotationConfigurationException if the supplied {@code containerType} |
|
|
|
* @throws AnnotationConfigurationException if the supplied {@code containerType} |
|
|
|
* is not a valid container annotation for the supplied {@code annotationType} |
|
|
|
* is not a valid container annotation for the supplied {@code annotationType} |
|
|
|
|
|
|
|
* @since 4.3 |
|
|
|
|
|
|
|
* @see #findMergedAnnotation(AnnotatedElement, Class) |
|
|
|
|
|
|
|
* @see #findAllMergedAnnotations(AnnotatedElement, Class) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static <A extends Annotation> Set<A> findMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
public static <A extends Annotation> Set<A> findMergedRepeatableAnnotations(AnnotatedElement element, |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerType) { |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerType) { |
|
|
|
@ -1280,9 +1280,9 @@ public class AnnotatedElementUtils { |
|
|
|
* annotation for the supplied repeatable {@code annotationType} (i.e., |
|
|
|
* annotation for the supplied repeatable {@code annotationType} (i.e., |
|
|
|
* that it declares a {@code value} attribute that holds an array of the |
|
|
|
* that it declares a {@code value} attribute that holds an array of the |
|
|
|
* {@code annotationType}). |
|
|
|
* {@code annotationType}). |
|
|
|
* @since 4.3 |
|
|
|
|
|
|
|
* @throws AnnotationConfigurationException if the supplied {@code containerType} |
|
|
|
* @throws AnnotationConfigurationException if the supplied {@code containerType} |
|
|
|
* is not a valid container annotation for the supplied {@code annotationType} |
|
|
|
* is not a valid container annotation for the supplied {@code annotationType} |
|
|
|
|
|
|
|
* @since 4.3 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private static void validateContainerType(Class<? extends Annotation> annotationType, |
|
|
|
private static void validateContainerType(Class<? extends Annotation> annotationType, |
|
|
|
Class<? extends Annotation> containerType) { |
|
|
|
Class<? extends Annotation> containerType) { |
|
|
|
@ -1305,9 +1305,6 @@ public class AnnotatedElementUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @since 4.3 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private static <A extends Annotation> Set<A> postProcessAndSynthesizeAggregatedResults(AnnotatedElement element, |
|
|
|
private static <A extends Annotation> Set<A> postProcessAndSynthesizeAggregatedResults(AnnotatedElement element, |
|
|
|
Class<A> annotationType, List<AnnotationAttributes> aggregatedResults) { |
|
|
|
Class<A> annotationType, List<AnnotationAttributes> aggregatedResults) { |
|
|
|
|
|
|
|
|
|
|
|
|