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.

PTW.java 495B

1234567891011121314151617181920212223242526
  1. import java.lang.reflect.*;
  2. aspect X pertypewithin(A*) {
  3. before(): execution(* *(..)) {}
  4. }
  5. class A {
  6. public void foo() {}
  7. }
  8. class AA {
  9. public void foo() {}
  10. }
  11. public class PTW {
  12. public void foo() {}
  13. public static void main(String []argv) {
  14. Field[] fs = X.class.getDeclaredFields();
  15. for (int i=0;i<fs.length;i++) {
  16. if (fs[i].getName().equals("ajc$initFailureCause")) {
  17. throw new RuntimeException("Should be no ajc$initFailureCause field for ptw");
  18. }
  19. }
  20. }
  21. }