public class RawAnnotations extends Object
| 构造器和说明 |
|---|
RawAnnotations() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <A extends Annotation> |
getAnnotation(AnnotatedElement element,
Class<A> annotationType)
获取指定元素上的注解,支持继承查找
|
static <A extends Annotation> |
getRepeatableAnnotation(AnnotatedElement element,
Class<A> annotationType)
获取可重复注解数组
|
@Nullable public static <A extends Annotation> A getAnnotation(AnnotatedElement element, Class<A> annotationType)
element - 注解元素(类、方法、参数等)annotationType - 要获取的注解类型@Nonnull public static <A extends Annotation> A[] getRepeatableAnnotation(AnnotatedElement element, Class<A> annotationType)
A - 注解类型element - 注解元素(类、方法、参数等)annotationType - 要获取的注解类型Copyright © 2025 fossc. All rights reserved.