|
|
|
@ -265,7 +265,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see AnnotatedElement#getAnnotations() |
|
|
|
* @see AnnotatedElement#getAnnotations() |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static Annotation @Nullable [] getAnnotations(AnnotatedElement annotatedElement) { |
|
|
|
public static Annotation @Nullable [] getAnnotations(AnnotatedElement annotatedElement) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return synthesizeAnnotationArray(annotatedElement.getAnnotations(), annotatedElement); |
|
|
|
return synthesizeAnnotationArray(annotatedElement.getAnnotations(), annotatedElement); |
|
|
|
@ -289,7 +289,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see AnnotatedElement#getAnnotations() |
|
|
|
* @see AnnotatedElement#getAnnotations() |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static Annotation @Nullable [] getAnnotations(Method method) { |
|
|
|
public static Annotation @Nullable [] getAnnotations(Method method) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return synthesizeAnnotationArray(BridgeMethodResolver.findBridgedMethod(method).getAnnotations(), method); |
|
|
|
return synthesizeAnnotationArray(BridgeMethodResolver.findBridgedMethod(method).getAnnotations(), method); |
|
|
|
@ -328,7 +328,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getAnnotationsByType |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getAnnotationsByType |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static <A extends Annotation> Set<A> getRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
public static <A extends Annotation> Set<A> getRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
Class<A> annotationType) { |
|
|
|
Class<A> annotationType) { |
|
|
|
|
|
|
|
|
|
|
|
@ -365,7 +365,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getAnnotationsByType |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getAnnotationsByType |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static <A extends Annotation> Set<A> getRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
public static <A extends Annotation> Set<A> getRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerAnnotationType) { |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerAnnotationType) { |
|
|
|
|
|
|
|
|
|
|
|
@ -409,7 +409,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static <A extends Annotation> Set<A> getDeclaredRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
public static <A extends Annotation> Set<A> getDeclaredRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
Class<A> annotationType) { |
|
|
|
Class<A> annotationType) { |
|
|
|
|
|
|
|
|
|
|
|
@ -446,7 +446,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType |
|
|
|
* @see java.lang.reflect.AnnotatedElement#getDeclaredAnnotationsByType |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static <A extends Annotation> Set<A> getDeclaredRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
public static <A extends Annotation> Set<A> getDeclaredRepeatableAnnotations(AnnotatedElement annotatedElement, |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerAnnotationType) { |
|
|
|
Class<A> annotationType, @Nullable Class<? extends Annotation> containerAnnotationType) { |
|
|
|
|
|
|
|
|
|
|
|
@ -597,7 +597,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see Class#getDeclaredAnnotations() |
|
|
|
* @see Class#getDeclaredAnnotations() |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static @Nullable Class<?> findAnnotationDeclaringClass( |
|
|
|
public static @Nullable Class<?> findAnnotationDeclaringClass( |
|
|
|
Class<? extends Annotation> annotationType, @Nullable Class<?> clazz) { |
|
|
|
Class<? extends Annotation> annotationType, @Nullable Class<?> clazz) { |
|
|
|
|
|
|
|
|
|
|
|
@ -633,7 +633,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see Class#getDeclaredAnnotations() |
|
|
|
* @see Class#getDeclaredAnnotations() |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static @Nullable Class<?> findAnnotationDeclaringClassForTypes( |
|
|
|
public static @Nullable Class<?> findAnnotationDeclaringClassForTypes( |
|
|
|
List<Class<? extends Annotation>> annotationTypes, @Nullable Class<?> clazz) { |
|
|
|
List<Class<? extends Annotation>> annotationTypes, @Nullable Class<?> clazz) { |
|
|
|
|
|
|
|
|
|
|
|
@ -686,7 +686,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @see #isAnnotationDeclaredLocally(Class, Class) |
|
|
|
* @see #isAnnotationDeclaredLocally(Class, Class) |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static boolean isAnnotationInherited(Class<? extends Annotation> annotationType, Class<?> clazz) { |
|
|
|
public static boolean isAnnotationInherited(Class<? extends Annotation> annotationType, Class<?> clazz) { |
|
|
|
return MergedAnnotations.from(clazz, SearchStrategy.INHERITED_ANNOTATIONS) |
|
|
|
return MergedAnnotations.from(clazz, SearchStrategy.INHERITED_ANNOTATIONS) |
|
|
|
.stream(annotationType) |
|
|
|
.stream(annotationType) |
|
|
|
@ -704,7 +704,7 @@ public abstract class AnnotationUtils { |
|
|
|
* @since 4.2.1 |
|
|
|
* @since 4.2.1 |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
* @deprecated as of 5.2 since it is superseded by the {@link MergedAnnotations} API |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated(since = "5.2") |
|
|
|
public static boolean isAnnotationMetaPresent(Class<? extends Annotation> annotationType, |
|
|
|
public static boolean isAnnotationMetaPresent(Class<? extends Annotation> annotationType, |
|
|
|
@Nullable Class<? extends Annotation> metaAnnotationType) { |
|
|
|
@Nullable Class<? extends Annotation> metaAnnotationType) { |
|
|
|
|
|
|
|
|
|
|
|
|