比如注解 AliasFor 中 value 和 attribute 互为别名,这样设置的好处是啥?真的有更方便使用吗?
因为觉得存在即合理,所以想知道这样做的意义是啥。希望各位大佬能答疑解惑~
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@Documented
public @interface AliasFor {
@AliasFor("attribute")
String value() default "";
@AliasFor("value")
String attribute() default "";
Class<? extends Annotation> annotation() default Annotation.class;
}