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.

Pr114495.aj 643B

12345678910111213141516171819202122
  1. public class Pr114495 {
  2. public static void main(String[] args) {
  3. C.go();
  4. }
  5. static class C {
  6. static void go() {}
  7. }
  8. }
  9. abstract aspect AA_ParameterizedTypeInPointcut<Target> {
  10. pointcut going() :call(void Target.go()) ;
  11. before() : going() {
  12. System.out.println("AA.going()");
  13. }
  14. }
  15. aspect A_ParameterizedTypeInPointcut
  16. extends AA_ParameterizedTypeInPointcut<Pr114495.C> {
  17. declare warning : going() : "going()"; // works fine
  18. before() : going() { // advice not applied
  19. System.out.println("A.going()");
  20. }
  21. }