blob: 50eaeb75d771214df7924392369a893658826426 (
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.*;
@Retention(RetentionPolicy.RUNTIME)
@interface Foo {
int i() default 37;
int j() default 48;
}
public class BindingInts4 {
public static void main(String []argv) {
BindingInts4 inst = new BindingInts4();
inst.a();
inst.b();
}
@Foo
void a() {}
void b() {}
}
aspect X {
before(int i,int j): execution(* a(..)) && @annotation(Foo(i)) && @annotation(Foo(j)) {
System.out.println(thisJoinPointStaticPart+" "+i+" "+j);
}
}
|