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.

F.java 481B

123456789101112131415161718192021222324
  1. interface P<T> {
  2. public T pm(T t);
  3. }
  4. interface C extends P<String> {
  5. public void cm();
  6. }
  7. class CImpl implements C {
  8. public void cm() {}
  9. public String pm(String s) { System.err.println(s);return s;}
  10. }
  11. public class F {
  12. public static void main(String []argv) {
  13. C test = new CImpl();
  14. test.pm("foo"); // manifests as 'Object pm(Object) call' due to type C being used
  15. }
  16. }
  17. aspect X {
  18. before(): call(String pm(..)) { System.err.println("advice");} // matches?
  19. }