Class MetaAnnotatedElement<T extends AnnotationMapping<Annotation>>

java.lang.Object
org.miaixz.bus.core.annotation.resolve.elements.MetaAnnotatedElement<T>
Type Parameters:
T - AnnotationMapping类型
All Implemented Interfaces:
Iterable<T>, AnnotatedElement

public class MetaAnnotatedElement<T extends AnnotationMapping<Annotation>> extends Object implements AnnotatedElement, Iterable<T>

注解元素映射,用于包装一个AnnotatedElement,然后将被包装的元素上, 直接声明的注解以及这些注解的元组全部解析为ResolvedAnnotationMapping。 从而用于支持对元注解的访问操作。

默认情况下,总是不扫描java.lang包下的注解, 并且在当前实例中,Inherited注解将不生效, 即通过directly方法将无法获得父类上带有Inherited的注解。

在一个MetaAnnotatedElement中, AnnotatedElement上同类型的注解或元注解只会被保留一个, 即当出现两个根注解都具有相同元注解时,仅有第一个根注解上的元注解会被保留, 因此当通过getAnnotationsByType(Class)getDeclaredAnnotationsByType(Class)方法用于只能获得一个注解对象。

Since:
Java 17+
Author:
Kimi Liu
See Also: