summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/ParameterizedMethodMatching.aj
blob: d33d48ecd9981f35718826f8bac6bdfbcd432217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.*;

public aspect ParameterizedMethodMatching {

  pointcut findMax() : execution(static<T> T *(List<T>));
    // matches findMax
    // does not match e.g. Object foo(List<Object> foos) {...}
    
  pointcut findMax2() : execution(static<X> X * List<X>));
    // matches findMax  
    
  pointcut findMax3() : execution(static<T> T+ *(List<T>));
    // CE  
    
  pointcut listargs(): args(List<?>);
    // always matches findMax
    
  pointcut listNumberargs() : args(List<Number>);
    // may match findMax (RTT)
  
}