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.

AbstractAspectUsedStatically.java 581B

1234567891011121314151617181920
  1. import org.aspectj.testing.*;
  2. /** @testcase PR#647 abstract aspect used statically should not cause instantiation of advice or pointcut */
  3. public abstract aspect AbstractAspectUsedStatically {
  4. public static void main (String[] args) {
  5. Tester.event("main");
  6. Tester.checkAllEvents();
  7. }
  8. static {
  9. Tester.expectEvent("main");
  10. }
  11. before() : definePrivate() {
  12. Tester.check(false, "definePrivate");
  13. }
  14. /** private must be implemented in defining class */
  15. private pointcut definePrivate() : execution(void main(..));
  16. }