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.

AroundNames.java 388B

12345678910111213141516171819202122232425262728
  1. public class AroundNames {
  2. public static void main(String[] args) {
  3. new Base().doit();
  4. new Derived().doit();
  5. }
  6. }
  7. class Base {
  8. static private final void m() {}
  9. public void doit() {
  10. m();
  11. }
  12. }
  13. class Derived {
  14. static private final void m() { return; } // "Derived"; }
  15. public void doit() {
  16. m();
  17. }
  18. }
  19. aspect A {
  20. Object around(): execution(* m()) {
  21. return proceed();
  22. }
  23. }