aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features151/newarrayjoinpoint/Ten.java
blob: b9313f04ed457e89b67f510ee0ae9f880e91f003 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public class Ten {

  public static void main(String []argv) {
    Ten a = new Ten();
    int [] is = new int[5];
  }
}

aspect X {

  pointcut p(Object o): call(new(..)) && target(o) && within(Ten);

  before(Object o): p(o) {
    System.err.println("before "+o);
  }

  after(Object o): p(o) {
    System.err.println("after "+o);
  }

  after() returning(Object o): call(*.new(..)) && within(Ten) {
    System.err.println("afterReturning "+o.getClass());
  }

}