summaryrefslogtreecommitdiffstats
path: root/tests/features160/parameterAnnotationMatching/Test2.java
blob: 13fd815fb28ee55af0e784f871160f3d7891f471 (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.lang.annotation.*;
 import java.lang.annotation.Target;

 public aspect Test2 {

     declare warning : execution(* *(@A (!(Object+)), ..)) : "mOne"; // f1
     declare warning : execution(* *(@A !String, ..)) : "mTwo"; // f3/f4
     
     void f1(@A int i) {} // 9 

     void f2(int i) {} // 11

     void f3(@A P i) {}

     void f4(P i) {}

     void f5(Integer i) {}
     
     void f6(@A Integer i) {}

     @Retention(RetentionPolicy.RUNTIME)
     private static @interface A { }

     @A static class P {}
 }