summaryrefslogtreecommitdiffstats
path: root/tests/java5/annotations/attarget/Program.java
blob: a56d5fb5e1c7bcce92e5605ff2149e1e2156de8d (plain)
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
import java.lang.annotation.*;

@MyAnnotation
public class Program {

  public static void main(String []argv) {
    Program p = new Program();
    p.m1();
    p.m2();
  }


  @MyAnnotation
  public void m1() {
    System.err.println("m1 method");
  }

  public void m2() {
    System.err.println("m2 method");
  }
}

@Retention(RetentionPolicy.RUNTIME)
@interface MyAnnotation {}