• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
method(String a, @Annotated.Marker(a="on parameter") String b)15     public void method(String a, @Annotated.Marker(a="on parameter") String b) {}
16 
17     @Retention(RetentionPolicy.RUNTIME)
18     public @interface Marker {
a()19         String a() default "";
b()20         String[] b() default {};
c()21         Nested c() default @Nested;
d()22         Nested[] d() default {};
23     }
24 
25     @Retention(RetentionPolicy.RUNTIME)
26     public @interface Nested {
e()27         String e() default "";
f()28         int f() default 0;
g()29         long g() default 0L;
30     }
31 }
32