summaryrefslogtreecommitdiffstats
path: root/tests/bugs150/PR102210.java
blob: 3c1046507fe4be8a3c96d42e8ed55f39335b8c23 (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
26
27
28
29
30
31
32
33
34
import java.util.*;

public aspect PR102210 {

 pointcut complex(List list):
   (execution(public * *(String, List)) && args(*,list)) ||
   (execution(public * *(String, List, String)) && args(*,list,*)) ||
   (execution(public * *(String, String[], List, String)) && args(*,*,list,*));

  before(List l): complex(l) {
    System.err.println("List size is "+l.size());
  }

  public static void main(String []argv) {
    List l = new ArrayList();
    l.add(".");
    m1("xxx",l);
    l.add(".");
    m2("xxx",l,"yyy");
    l.add(".");
    m3("xxx",new String[]{"xxx","yyy"},l,"zzz");
  }

  public static void m1(String a,List b) { 
    System.err.println("m1 running"); 
  }
  public static void m2(String a,List b,String c) { 
    System.err.println("m2 running"); 
  }
  public static void m3(String a,String[] b,List c,String d) { 
    System.err.println("m3 running");
  }

}