blob: 8e3989b0693d231f6761b1e57375ad8d5dc92983 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
public class Twelve {
public static void main(String[] argv) {
Twelve a = new Twelve();
a.m("abc");
}
public void m(String s) {
System.out.println("Method m() running");
}
}
aspect X {
boolean doit() {
System.out.println("In instance check method doit()");
return true;
}
before(String s):execution(* m(..)) && if(thisAspectInstance.doit()) && args(s) {
System.out.println("In advice() arg="+s+" tjpsp="+thisJoinPointStaticPart);
}
}
|