You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Scenario3.aj 628B

123456789101112131415161718192021222324
  1. // "no XLint warning: thisJoinPoint not lazy (no if PCD) but would have been stopped anyway by around advice"
  2. public aspect Scenario3 {
  3. public static boolean enabled = true;
  4. pointcut toBeTraced() : execution(* main(..));
  5. Object around() : toBeTraced() {
  6. //Object[] args = thisJoinPoint.getArgs();
  7. return proceed();
  8. }
  9. before () : toBeTraced(){ // no if condition so tjp not made lazily
  10. Object[] args = thisJoinPoint.getArgs(); // tjp not made lazily
  11. System.out.println(thisJoinPoint + ", arg's: " + args.length);
  12. }
  13. }
  14. class Test{
  15. static void main(String [] args){
  16. }
  17. }