aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs1612/pr347684/BindingInts.java
blob: bac7bdaa99c95c2d6728366885a5e5a45fc99143 (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
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@interface Foo {
  int i() default 37;
}


public class BindingInts {
  public static void main(String []argv) {
    BindingInts inst = new BindingInts();
    inst.a();
    inst.b();
  }
@Foo
void a() {}
void b() {}
}

aspect X {
  before(int i): execution(* a(..)) && @annotation(Foo(i)) {
    System.out.println(thisJoinPointStaticPart+" "+i);
  }
}