Package | Description |
---|---|
org.dromara.hutool.core.annotation |
注解包,提供增强型注解和注解工具类,处理包括:
注解元素(AnnotatedElement)上的注解。 |
org.dromara.hutool.core.annotation.elements |
AnnotatedElement对象实现
|
Modifier and Type | Class and Description |
---|---|
class |
GenericAnnotationMapping
AnnotationMapping 的基本实现,仅仅是简单包装了注解对象 |
class |
ResolvedAnnotationMapping
注解映射,用于包装并增强一个普通注解对象,
包装后的可以通过
getResolvedXXX 获得注解对象或属性值,
可以支持属性别名与属性覆写的属性解析机制。 |
Modifier and Type | Method and Description |
---|---|
static <A extends Annotation> |
AnnotationMappingProxy.create(Class<? extends A> annotationType,
AnnotationMapping<A> mapping)
创建一个代理对象
|
Modifier and Type | Class and Description |
---|---|
class |
MetaAnnotatedElement<T extends AnnotationMapping<Annotation>>
注解元素映射,用于包装一个
AnnotatedElement ,然后将被包装的元素上,
直接声明的注解以及这些注解的元组全部解析为ResolvedAnnotationMapping 。 |
class |
RepeatableMetaAnnotatedElement<T extends AnnotationMapping<Annotation>>
支持可重复注解的增强
AnnotatedElement ,
功能与MetaAnnotatedElement 类似,但是存在下述差异:
限制以同一根注解延伸出的树结构上——而不是AnnotatedElement 上——每种类型注解只能保留一个,
即当AnnotatedElement 存在多个根注解有相同的元注解时,这些元注解会都会被扫描到;
支持扫描AnnotatedElement 可重复注解,即当当前实例指定的RepeatableAnnotationCollector
支持从AnnotatedElement 上直接声明的注解中获得可重复注解时,
则将会自动将其展开直到不为容器注解为止。 |
Modifier and Type | Method and Description |
---|---|
static <A extends AnnotationMapping<Annotation>> |
RepeatableMetaAnnotatedElement.create(AnnotatedElement element,
BiFunction<A,Annotation,A> mappingFactory)
获取
AnnotatedElement 上的注解结构,该方法会针对相同的AnnotatedElement 缓存映射对象 |
static <A extends AnnotationMapping<Annotation>> |
MetaAnnotatedElement.create(AnnotatedElement element,
BiFunction<A,Annotation,A> mappingFactory)
获取
AnnotatedElement 上的注解结构,该方法会针对相同的AnnotatedElement 缓存映射对象 |
static <A extends AnnotationMapping<Annotation>> |
RepeatableMetaAnnotatedElement.create(RepeatableAnnotationCollector collector,
AnnotatedElement element,
BiFunction<A,Annotation,A> mappingFactory)
获取
AnnotatedElement 上的注解结构,该方法会针对相同的AnnotatedElement 缓存映射对象 |
Copyright © 2025. All rights reserved.