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.

BadAround.java 488B

12345678910111213141516171819202122232425
  1. public class BadAround {
  2. }
  3. class C {
  4. public String m(String s) { return "hi"; }
  5. public int mi() { return 2; }
  6. }
  7. aspect A {
  8. Object around(): call(String C.m(..)) {
  9. return new Integer(2);
  10. }
  11. Object around(Object a): call(String C.m(..)) && args(a) {
  12. return proceed(new Integer(2));
  13. }
  14. Object around(): call(int C.mi()) {
  15. return "2";
  16. }
  17. int around(): call(String C.m(..)) { // ERR, return type mismatch
  18. return 2;
  19. }
  20. }