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.

AbstractMethods.aj 551B

12345678910111213141516171819202122232425262728293031
  1. import org.aspectj.lang.annotation.*;
  2. @Aspect
  3. public abstract class AbstractMethods {
  4. @Pointcut
  5. protected abstract void tracingScope();
  6. @Before("tracingScope()")
  7. public void doit() {
  8. test();
  9. System.out.println("advice running");
  10. }
  11. protected abstract void test();
  12. }
  13. /*
  14. public abstract aspect AbstractMethods {
  15. protected abstract pointcut tracingScope ();
  16. before () : tracingScope () {
  17. test();
  18. System.out.println("advice running");
  19. }
  20. protected abstract void test ();
  21. // protected void test () {}
  22. }
  23. */