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