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.

Profiling.aj 579B

1234567891011121314151617
  1. package test;
  2. public aspect Profiling {
  3. pointcut profile(): execution(* *.*(..)) ;
  4. private pointcut scope() :
  5. if(condition())
  6. //&& !(execution(* *.condition())) <- uncomment and infinite loop disappears
  7. && !cflow(execution(* *.condition()));
  8. public static boolean condition(){
  9. return (Math.random()<2); //always true
  10. }
  11. before(): profile() && scope() {
  12. System.out.println("Entering method "+thisJoinPointStaticPart.getSignature());
  13. }
  14. }