mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix doc
This commit is contained in:
parent
89dfeb5a76
commit
ca10c8e7b9
@ -98,9 +98,10 @@ public abstract class AbstractLinkAnnotationPostProcessor implements Synthesized
|
||||
*
|
||||
* @param annotation {@link Link}注解
|
||||
* @param synthesizer 注解合成器
|
||||
* @param defaultType 默认类型
|
||||
* @return {@link SynthesizedAnnotation}
|
||||
*/
|
||||
protected SynthesizedAnnotation getLinkedAnnotation(
|
||||
Link annotation, AnnotationSynthesizer synthesizer, Class<? extends Annotation> defaultType) {
|
||||
protected SynthesizedAnnotation getLinkedAnnotation(Link annotation, AnnotationSynthesizer synthesizer, Class<? extends Annotation> defaultType) {
|
||||
final Class<?> targetAnnotationType = getLinkedAnnotationType(annotation, defaultType);
|
||||
return synthesizer.getSynthesizedAnnotation(targetAnnotationType);
|
||||
}
|
||||
|
@ -22,12 +22,16 @@ public @interface AliasFor {
|
||||
|
||||
/**
|
||||
* 产生关联的注解类型,当不指定时,默认指注释的属性所在的类
|
||||
*
|
||||
* @return 注解类型
|
||||
*/
|
||||
@Link(annotation = Link.class, attribute = "annotation", type = RelationType.FORCE_ALIAS_FOR)
|
||||
Class<? extends Annotation> annotation() default Annotation.class;
|
||||
|
||||
/**
|
||||
* {@link #annotation()}指定注解中关联的属性
|
||||
*
|
||||
* @return 关联属性
|
||||
*/
|
||||
@Link(annotation = Link.class, attribute = "attribute", type = RelationType.FORCE_ALIAS_FOR)
|
||||
String attribute() default "";
|
||||
|
@ -19,12 +19,16 @@ public @interface ForceAliasFor {
|
||||
|
||||
/**
|
||||
* 产生关联的注解类型,当不指定时,默认指注释的属性所在的类
|
||||
*
|
||||
* @return 关联注解类型
|
||||
*/
|
||||
@Link(annotation = Link.class, attribute = "annotation", type = RelationType.FORCE_ALIAS_FOR)
|
||||
Class<? extends Annotation> annotation() default Annotation.class;
|
||||
|
||||
/**
|
||||
* {@link #annotation()}指定注解中关联的属性
|
||||
*
|
||||
* @return 关联的属性
|
||||
*/
|
||||
@Link(annotation = Link.class, attribute = "attribute", type = RelationType.FORCE_ALIAS_FOR)
|
||||
String attribute() default "";
|
||||
|
@ -4,7 +4,7 @@ import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>用于在同一注解中,或具有一定关联的不同注解的属性中,表明这些属性之间具有特定的关联关系。
|
||||
* 在通过{@link SynthesizedAggregateAnnotation}获取合成注解后,合成注解获取属性值时会根据该注解进行调整。<br />
|
||||
* 在通过{@link SynthesizedAggregateAnnotation}获取合成注解后,合成注解获取属性值时会根据该注解进行调整。<br>
|
||||
*
|
||||
* <p>该注解存在三个字注解:{@link MirrorFor}、{@link ForceAliasFor}或{@link AliasFor},
|
||||
* 使用三个子注解等同于{@link Link}。但是需要注意的是,
|
||||
@ -27,16 +27,22 @@ public @interface Link {
|
||||
|
||||
/**
|
||||
* 产生关联的注解类型,当不指定时,默认指注释的属性所在的类
|
||||
*
|
||||
* @return 关联的注解类型
|
||||
*/
|
||||
Class<? extends Annotation> annotation() default Annotation.class;
|
||||
|
||||
/**
|
||||
* {@link #annotation()}指定注解中关联的属性
|
||||
*
|
||||
* @return 属性名
|
||||
*/
|
||||
String attribute() default "";
|
||||
|
||||
/**
|
||||
* {@link #attribute()}指定属性与当前注解的属性建的关联关系类型
|
||||
*
|
||||
* @return 关系类型
|
||||
*/
|
||||
RelationType type() default RelationType.MIRROR_FOR;
|
||||
|
||||
|
@ -25,12 +25,16 @@ public @interface MirrorFor {
|
||||
|
||||
/**
|
||||
* 产生关联的注解类型,当不指定时,默认指注释的属性所在的类
|
||||
*
|
||||
* @return 关联的注解类型
|
||||
*/
|
||||
@Link(annotation = Link.class, attribute = "annotation", type = RelationType.FORCE_ALIAS_FOR)
|
||||
Class<? extends Annotation> annotation() default Annotation.class;
|
||||
|
||||
/**
|
||||
* {@link #annotation()}指定注解中关联的属性
|
||||
*
|
||||
* @return 属性名
|
||||
*/
|
||||
@Link(annotation = Link.class, attribute = "attribute", type = RelationType.FORCE_ALIAS_FOR)
|
||||
String attribute() default "";
|
||||
|
@ -34,6 +34,7 @@ public class SynthesizedAnnotationProxy implements InvocationHandler {
|
||||
/**
|
||||
* 创建一个代理注解,生成的代理对象将是{@link SyntheticProxyAnnotation}与指定的注解类的子类。
|
||||
*
|
||||
* @param <T> 注解类型
|
||||
* @param annotationType 注解类型
|
||||
* @param annotationAttributeValueProvider 注解属性值获取器
|
||||
* @param annotation 合成注解
|
||||
@ -61,6 +62,7 @@ public class SynthesizedAnnotationProxy implements InvocationHandler {
|
||||
/**
|
||||
* 创建一个代理注解,生成的代理对象将是{@link SyntheticProxyAnnotation}与指定的注解类的子类。
|
||||
*
|
||||
* @param <T> 注解类型
|
||||
* @param annotationType 注解类型
|
||||
* @param annotation 合成注解
|
||||
* @return 代理注解
|
||||
@ -71,7 +73,7 @@ public class SynthesizedAnnotationProxy implements InvocationHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* 该类是否为通过{@link SynthesizedAnnotationProxy}生成的代理类
|
||||
* 该类是否为通过{@code SynthesizedAnnotationProxy}生成的代理类
|
||||
*
|
||||
* @param annotationType 注解类型
|
||||
* @return 是否
|
||||
|
Loading…
x
Reference in New Issue
Block a user