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.

Eleven.java 433B

123456789101112131415161718192021222324
  1. // let's look at using it for real...
  2. public class Eleven {
  3. static int[] is1,is2;
  4. public static void main(String []argv) {
  5. is1 = new int[5];
  6. is2 = new int[8];
  7. }
  8. }
  9. aspect X {
  10. Object interestingArray = null;
  11. after(int size) returning(Object o): call(*.new(..)) && within(Eleven) && args(size) {
  12. if (size==8) {
  13. System.err.println("Found the interesting array");
  14. interestingArray = o;
  15. }
  16. }
  17. }