summaryrefslogtreecommitdiffstats
path: root/tests/features151/newarrayjoinpoint/Five.java
blob: c87e1224853dbcdec0df647d7d7545ce4ee9a6a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// different advice kinds on the newarray jp
public class Five {
  public static void main(String []argv) {
    Integer[] Is = new Integer[5];
  }
}

aspect X {
  before(): call(new(..)) && within(Five) { System.err.println("before");}
}
aspect Y {
  after(): call(new(..)) && within(Five){System.err.println("after");}
  after() returning: call(new(..)) && within(Five){System.err.println("after returning");}
}
aspect Z {
  Integer[] around(): call(new(..)) && within(Five){System.err.println("around!"); return new Integer[500]; }
}