1 package test4; 2 3 enum GetAllRefEnum { A, B }; 4 5 @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) 6 @interface GetAllRefAnno { getA()7 GetAllRefEnum getA(); getC()8 Class getC(); 9 } 10 11 @interface GetAllRefAnnoC {} 12 13 @interface GetAllRefAnnoC2 {} 14 15 @interface GetAllRefAnnoC3 {} 16 17 @interface GetAllRefAnnoC4 {} 18 19 @GetAllRefAnno(getA = GetAllRefEnum.A, getC = String.class) 20 public class GetAllRef { 21 } 22 23 @GetAllRefAnno(getA = GetAllRefEnum.A, getC = String.class) 24 class GetAllRefB { 25 } 26 27 @GetAllRefAnno(getA = GetAllRefEnum.A, getC = String.class) 28 class GetAllRefC { bar(@etAllRefAnnoC3 int i, int j, @GetAllRefAnnoC2 @GetAllRefAnnoC4 boolean b)29 void bar(@GetAllRefAnnoC3 int i, int j, 30 @GetAllRefAnnoC2 @GetAllRefAnnoC4 boolean b) {} foo()31 @GetAllRefAnnoC void foo() {} 32 @GetAllRefAnnoC2 int value; 33 } 34