| Package | Description |
|---|---|
| cn.hutool.core.annotation |
注解包,提供增强型注解和注解工具类
|
| Modifier and Type | Class and Description |
|---|---|
interface |
AliasFor
Link的子注解。 |
interface |
ForceAliasFor
Link的子注解。 |
interface |
MirrorFor
Link的子注解。 |
| Modifier and Type | Method and Description |
|---|---|
protected Link |
AbstractLinkAnnotationPostProcessor.getLinkAnnotation(AnnotationAttribute attribute,
RelationType... relationTypes)
从注解属性上获取指定类型的
Link注解 |
| Modifier and Type | Method and Description |
|---|---|
protected void |
AbstractLinkAnnotationPostProcessor.checkLinkedAttributeNotNull(AnnotationAttribute original,
AnnotationAttribute linkedAttribute,
Link annotation)
检查
Link指向的注解属性是否存在 |
protected SynthesizedAnnotation |
AbstractLinkAnnotationPostProcessor.getLinkedAnnotation(Link annotation,
AnnotationSynthesizer synthesizer,
Class<? extends Annotation> defaultType)
从合成注解中获取
type()指定的注解对象 |
protected Class<?> |
AbstractLinkAnnotationPostProcessor.getLinkedAnnotationType(Link annotation,
Class<?> defaultType)
|
protected void |
AliasLinkAnnotationPostProcessor.processLinkedAttribute(AnnotationSynthesizer synthesizer,
Link annotation,
SynthesizedAnnotation originalAnnotation,
AnnotationAttribute originalAttribute,
SynthesizedAnnotation linkedAnnotation,
AnnotationAttribute linkedAttribute)
获取
Link指向的目标注解属性,并根据type()的类型是
RelationType.ALIAS_FOR或RelationType.FORCE_ALIAS_FOR
将目标注解属性包装为AliasedAnnotationAttribute或ForceAliasedAnnotationAttribute,
然后用包装后注解属性在对应的合成注解中替换原始的目标注解属性 |
protected abstract void |
AbstractLinkAnnotationPostProcessor.processLinkedAttribute(AnnotationSynthesizer synthesizer,
Link annotation,
SynthesizedAnnotation originalAnnotation,
AnnotationAttribute originalAttribute,
SynthesizedAnnotation linkedAnnotation,
AnnotationAttribute linkedAttribute)
对关联的合成注解对象及其关联属性的处理
|
protected void |
MirrorLinkAnnotationPostProcessor.processLinkedAttribute(AnnotationSynthesizer synthesizer,
Link annotation,
SynthesizedAnnotation originalAnnotation,
AnnotationAttribute originalAttribute,
SynthesizedAnnotation linkedAnnotation,
AnnotationAttribute linkedAttribute)
将存在镜像关系的合成注解属性分别包装为
MirroredAnnotationAttribute对象,
并使用包装后MirroredAnnotationAttribute替换在它们对应合成注解实例中的AnnotationAttribute |
Copyright © 2025. All rights reserved.