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.

Base.java 500B

123456789101112131415161718192021222324252627282930
  1. package aspect1;
  2. public abstract aspect Base {
  3. private Helper h = new Helper();
  4. {
  5. h.h1 = new Helper();
  6. h.h1.h1 = new Helper();
  7. }
  8. private class Inner {
  9. String data = "inner";
  10. }
  11. protected abstract pointcut where();
  12. Object around(double d, int i): where() && args(i, d) {
  13. String s = h.data + h.h1.data + h.h1.h1.data + d + i;
  14. System.err.println(s);
  15. return proceed(d, i);
  16. }
  17. }
  18. class Helper {
  19. String data = "helper";
  20. Helper h1;
  21. String getData() {
  22. return data;
  23. }
  24. }