|
|
|
|
@ -61,7 +61,7 @@ import org.springframework.util.StringUtils;
@@ -61,7 +61,7 @@ import org.springframework.util.StringUtils;
|
|
|
|
|
* <h3>Terminology</h3> |
|
|
|
|
* The terms <em>directly present</em>, <em>indirectly present</em>, and |
|
|
|
|
* <em>present</em> have the same meanings as defined in the class-level |
|
|
|
|
* javadoc for {@link AnnotatedElement} (in Java 8). |
|
|
|
|
* javadoc for {@link AnnotatedElement}. |
|
|
|
|
* |
|
|
|
|
* <p>An annotation is <em>meta-present</em> on an element if the annotation |
|
|
|
|
* is declared as a meta-annotation on some other annotation which is |
|
|
|
|
@ -74,7 +74,8 @@ import org.springframework.util.StringUtils;
@@ -74,7 +74,8 @@ import org.springframework.util.StringUtils;
|
|
|
|
|
* provide support for finding annotations used as meta-annotations. Consult the |
|
|
|
|
* javadoc for each method in this class for details. For fine-grained support for |
|
|
|
|
* meta-annotations with <em>attribute overrides</em> in <em>composed annotations</em>, |
|
|
|
|
* consider using {@link AnnotatedElementUtils}'s more specific methods instead. |
|
|
|
|
* consider using the {@link MergedAnnotations} API directly or the more specific |
|
|
|
|
* methods in {@link AnnotatedElementUtils} instead. |
|
|
|
|
* |
|
|
|
|
* <h3>Attribute Aliases</h3> |
|
|
|
|
* <p>All public methods in this class that return annotations, arrays of |
|
|
|
|
@ -98,6 +99,7 @@ import org.springframework.util.StringUtils;
@@ -98,6 +99,7 @@ import org.springframework.util.StringUtils;
|
|
|
|
|
* @since 2.0 |
|
|
|
|
* @see AliasFor |
|
|
|
|
* @see AnnotationAttributes |
|
|
|
|
* @see MergedAnnotations |
|
|
|
|
* @see AnnotatedElementUtils |
|
|
|
|
* @see BridgeMethodResolver |
|
|
|
|
* @see java.lang.reflect.AnnotatedElement#getAnnotations() |
|
|
|
|
@ -303,11 +305,11 @@ public abstract class AnnotationUtils {
@@ -303,11 +305,11 @@ public abstract class AnnotationUtils {
|
|
|
|
|
* {@code annotationType} from the supplied {@link AnnotatedElement}, where |
|
|
|
|
* such annotations are either <em>present</em>, <em>indirectly present</em>, |
|
|
|
|
* or <em>meta-present</em> on the element. |
|
|
|
|
* <p>This method mimics the functionality of Java 8's |
|
|
|
|
* <p>This method mimics the functionality of |
|
|
|
|
* {@link java.lang.reflect.AnnotatedElement#getAnnotationsByType(Class)} |
|
|
|
|
* with support for automatic detection of a <em>container annotation</em> |
|
|
|
|
* declared via @{@link java.lang.annotation.Repeatable} (when running on |
|
|
|
|
* Java 8 or higher) and with additional support for meta-annotations. |
|
|
|
|
* declared via {@link java.lang.annotation.Repeatable @Repeatable} and with |
|
|
|
|
* additional support for meta-annotations. |
|
|
|
|
* <p>Handles both single annotations and annotations nested within a |
|
|
|
|
* <em>container annotation</em>. |
|
|
|
|
* <p>Correctly handles <em>bridge methods</em> generated by the |
|
|
|
|
@ -338,7 +340,7 @@ public abstract class AnnotationUtils {
@@ -338,7 +340,7 @@ public abstract class AnnotationUtils {
|
|
|
|
|
* {@code annotationType} from the supplied {@link AnnotatedElement}, where |
|
|
|
|
* such annotations are either <em>present</em>, <em>indirectly present</em>, |
|
|
|
|
* or <em>meta-present</em> on the element. |
|
|
|
|
* <p>This method mimics the functionality of Java 8's |
|
|
|
|
* <p>This method mimics the functionality |
|
|
|
|
* {@link java.lang.reflect.AnnotatedElement#getAnnotationsByType(Class)} |
|
|
|
|
* with additional support for meta-annotations. |
|
|
|
|
* <p>Handles both single annotations and annotations nested within a |
|
|
|
|
@ -349,10 +351,9 @@ public abstract class AnnotationUtils {
@@ -349,10 +351,9 @@ public abstract class AnnotationUtils {
|
|
|
|
|
* <em>present</em> on the supplied element. |
|
|
|
|
* @param annotatedElement the element to look for annotations on |
|
|
|
|
* @param annotationType the annotation type to look for |
|
|
|
|
* @param containerAnnotationType the type of the container that holds |
|
|
|
|
* the annotations; may be {@code null} if a container is not supported |
|
|
|
|
* or if it should be looked up via @{@link java.lang.annotation.Repeatable} |
|
|
|
|
* when running on Java 8 or higher |
|
|
|
|
* @param containerAnnotationType the type of the container that holds the |
|
|
|
|
* annotations; may be {@code null} if a container is not supported or if it |
|
|
|
|
* should be looked up via {@link java.lang.annotation.Repeatable @Repeatable} |
|
|
|
|
* @return the annotations found or an empty set (never {@code null}) |
|
|
|
|
* @since 4.2 |
|
|
|
|
* @see #getRepeatableAnnotations(AnnotatedElement, Class) |
|
|
|
|
@ -384,11 +385,11 @@ public abstract class AnnotationUtils {
@@ -384,11 +385,11 @@ public abstract class AnnotationUtils {
|
|
|
|
|
* of {@code annotationType} from the supplied {@link AnnotatedElement}, |
|
|
|
|
* where such annotations are either <em>directly present</em>, |
|
|
|
|
* <em>indirectly present</em>, or <em>meta-present</em> on the element. |
|
|
|
|
* <p>This method mimics the functionality of Java 8's |
|
|
|
|
* <p>This method mimics the functionality of |
|
|
|
|
* {@link java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType(Class)} |
|
|
|
|
* with support for automatic detection of a <em>container annotation</em> |
|
|
|
|
* declared via @{@link java.lang.annotation.Repeatable} (when running on |
|
|
|
|
* Java 8 or higher) and with additional support for meta-annotations. |
|
|
|
|
* declared via {@link java.lang.annotation.Repeatable @Repeatable} and with |
|
|
|
|
* additional support for meta-annotations. |
|
|
|
|
* <p>Handles both single annotations and annotations nested within a |
|
|
|
|
* <em>container annotation</em>. |
|
|
|
|
* <p>Correctly handles <em>bridge methods</em> generated by the |
|
|
|
|
@ -420,7 +421,7 @@ public abstract class AnnotationUtils {
@@ -420,7 +421,7 @@ public abstract class AnnotationUtils {
|
|
|
|
|
* of {@code annotationType} from the supplied {@link AnnotatedElement}, |
|
|
|
|
* where such annotations are either <em>directly present</em>, |
|
|
|
|
* <em>indirectly present</em>, or <em>meta-present</em> on the element. |
|
|
|
|
* <p>This method mimics the functionality of Java 8's |
|
|
|
|
* <p>This method mimics the functionality of |
|
|
|
|
* {@link java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType(Class)} |
|
|
|
|
* with additional support for meta-annotations. |
|
|
|
|
* <p>Handles both single annotations and annotations nested within a |
|
|
|
|
@ -431,10 +432,9 @@ public abstract class AnnotationUtils {
@@ -431,10 +432,9 @@ public abstract class AnnotationUtils {
|
|
|
|
|
* <em>present</em> on the supplied element. |
|
|
|
|
* @param annotatedElement the element to look for annotations on |
|
|
|
|
* @param annotationType the annotation type to look for |
|
|
|
|
* @param containerAnnotationType the type of the container that holds |
|
|
|
|
* the annotations; may be {@code null} if a container is not supported |
|
|
|
|
* or if it should be looked up via @{@link java.lang.annotation.Repeatable} |
|
|
|
|
* when running on Java 8 or higher |
|
|
|
|
* @param containerAnnotationType the type of the container that holds the |
|
|
|
|
* annotations; may be {@code null} if a container is not supported or if it |
|
|
|
|
* should be looked up via {@link java.lang.annotation.Repeatable @Repeatable} |
|
|
|
|
* @return the annotations found or an empty set (never {@code null}) |
|
|
|
|
* @since 4.2 |
|
|
|
|
* @see #getRepeatableAnnotations(AnnotatedElement, Class) |
|
|
|
|
|