blob: aa18dc0abfd041dc85d473b0f45c85117889e593 (
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 Thirteen {
public static void main(String[] argv) {
Thirteen a = new Thirteen();
a.m("abc");
}
public void m(String s) {
System.out.println("Method m() running");
}
}
aspect X {
static boolean printit(Object o) {
System.out.println("instance is "+o.getClass().getName());
return true;
}
before(String s):args(s) && execution(* m(..)) && if(printit(thisAspectInstance)){
System.out.println("In advice() arg="+s+" tjpsp="+thisJoinPointStaticPart);
}
}
|