Uses of Interface
org.miaixz.bus.core.lang.annotation.resolve.RepeatableAnnotationCollector
Packages that use RepeatableAnnotationCollector
Package
Description
注解包,提供增强型注解和注解工具类,处理包括:
注解元素(AnnotatedElements)上的注解。
父元素上的注解(包括类、接口、方法、属性)。
注解上的注解。
父元素上的注解上的注解。
AnnotatedElement 对象实现
-
Uses of RepeatableAnnotationCollector in org.miaixz.bus.core.lang.annotation.resolve
Classes in org.miaixz.bus.core.lang.annotation.resolve that implement RepeatableAnnotationCollectorModifier and TypeClassDescriptionstatic classRepeatableAnnotationCollector的基本实现static class自定义判断条件的实现,当解析注解属性时,将根据给定的判断条件, 确定该属性中是否含有可重复注解,收集器将返回所有匹配的属性中的可重复注解。static class全量实现,当注解中存在有属性为注解数组,且该数组对应的注解类型被Repeatable注解时, 认为该属性包含可重复注解。 收集器将返回所有符合上述条件的属性中的可重复注解。static class空实现static class标准实现,当注解中有且仅有一个名为value的属性时, 若该属性类型为注解数组,且该数组对应的注解类型被Repeatable注解, 则收集器将返回该属性中包括的可重复注解。Methods in org.miaixz.bus.core.lang.annotation.resolve that return RepeatableAnnotationCollectorModifier and TypeMethodDescriptionRepeatableAnnotationCollector.condition(BiPredicate<Annotation, Method> predicate) 当解析注解属性时,将根据给定的判断条件,确定该属性中是否含有可重复注解。 收集器将返回所有匹配的属性中的可重复注解。RepeatableAnnotationCollector.full()当注解中存在有属性为注解数组,且该数组对应的注解类型被Repeatable注解时, 认为该属性包含可重复注解。 收集器将返回所有符合上述条件的属性中的可重复注解。 eg:RepeatableAnnotationCollector.none()空实现RepeatableAnnotationCollector.standard()当注解中有且仅有一个名为value的属性时, 若该属性类型为注解数组,且该数组对应的注解类型被Repeatable注解, 则收集器将返回该属性中包括的可重复注解。 eg:Methods in org.miaixz.bus.core.lang.annotation.resolve with parameters of type RepeatableAnnotationCollectorModifier and TypeMethodDescriptionstatic AnnotatedElementAnnotatedElements.toRepeatableMetaElement(AnnotatedElement element, RepeatableAnnotationCollector collector, boolean resolved) 将AnnotatedElement转为RepeatableMetaAnnotatedElement, 得到的对象可访问AnnotatedElement上的直接声明的注解, 通过collector从这些注解获得的可重复注解,以及上述注解的所有元注解。 注意:方法将不会通过缓存结果,因此每次调用都需要重新通过反射并获得相关注解。 -
Uses of RepeatableAnnotationCollector in org.miaixz.bus.core.lang.annotation.resolve.elements
Methods in org.miaixz.bus.core.lang.annotation.resolve.elements with parameters of type RepeatableAnnotationCollectorModifier and TypeMethodDescriptionstatic <A extends AnnotationMapping<Annotation>>
RepeatableMetaAnnotatedElement<A> RepeatableMetaAnnotatedElement.create(RepeatableAnnotationCollector collector, AnnotatedElement element, BiFunction<A, Annotation, A> mappingFactory) 获取AnnotatedElement上的注解结构,该方法会针对相同的AnnotatedElement缓存映射对象