blob: cbee2ba7c63fbb3402e38f80c1b4c89eab910e47 (
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
|
// "no XLint warning: thisJoinPoint not lazy (no if PCD) but would have been stopped anyway by around advice"
public aspect Scenario3 {
public static boolean enabled = true;
pointcut toBeTraced() : execution(* main(..));
Object around() : toBeTraced() {
//Object[] args = thisJoinPoint.getArgs();
return proceed();
}
before () : toBeTraced(){ // no if condition so tjp not made lazily
Object[] args = thisJoinPoint.getArgs(); // tjp not made lazily
System.out.println(thisJoinPoint + ", arg's: " + args.length);
}
}
class Test{
static void main(String [] args){
}
}
|