aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr114343/case2/TestAspect.java
blob: fcc760ac7b24caa5f91f837bad0a9199ce08aa50 (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
import java.util.*;

public privileged aspect TestAspect {

      pointcut TestToArray(Test mt) :
                target(mt) &&
                !within(TestAspect);


    Object[] around(Test mt, Object[] objs) :
            TestToArray(mt) &&
            args(objs) &&
            execution(Object[] Test.toArray(Object[])) {

    System.err.println("In around advice");
        objs = proceed(mt, objs);
        return objs;
    }

  public static void main(String[] argv) {
     System.err.println("TestAspect.main: Calling foo");
     new TTT().foo();   
     System.err.println("TestAspect.main: done");
  }
}