我该如何编写一个自定义的注解,以便接收另一个注解和值?
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface TestAnnotation{
Class<? extends TestAnnotationChild> annotation();
}
第二个注释
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface TestAnnotationChild{
}
我希望能够做类似以下的事情:
@TestAnnotation(@TestAnnotationChild={values})
我该如何做类似于这样的事情?