Home | History | Annotate | Download | only in testdata
      1 package testdata;
      2 
      3 import java.lang.annotation.Retention;
      4 import java.lang.annotation.RetentionPolicy;
      5 
      6 @Annotated.Marker(a = "on class", b = {"A", "B", "C" },
      7         c = @Annotated.Nested(e="E1", f=1695938256, g=7264081114510713000L),
      8         d = { @Annotated.Nested(e="E2", f=1695938256, g=7264081114510713000L) })
      9 public class Annotated {
     10 
     11     @Annotated.Marker(a="on field")
     12     public String field;
     13 
     14     @Annotated.Marker(a="on method")
     15     public void method(String a, @Annotated.Marker(a="on parameter") String b) {}
     16 
     17     @Retention(RetentionPolicy.RUNTIME)
     18     public @interface Marker {
     19         String a() default "";
     20         String[] b() default {};
     21         Nested c() default @Nested;
     22         Nested[] d() default {};
     23     }
     24 
     25     @Retention(RetentionPolicy.RUNTIME)
     26     public @interface Nested {
     27         String e() default "";
     28         int f() default 0;
     29         long g() default 0L;
     30     }
     31 }
     32