summaryrefslogtreecommitdiff
path: root/test/support/annotations/NestedAnnotations.java
blob: c4a98a0af3d004ce36c2c0782ded1dffe4b2fa90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package test;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

public class NestedAnnotations {

  @OuterAnno(inner=@InnerAnno(name="inner"))
  String field;
  
  @Target({FIELD}) 
  @Retention(RUNTIME)
  public static @interface InnerAnno {
    String name();
  }
  
  @Target({FIELD}) 
  @Retention(RUNTIME)
  public static @interface OuterAnno {
    InnerAnno inner();
  }
}