1
2
3
4
5
6
7
8
9
10
11
12 package com.puppycrawl.tools.checkstyle.checks.annotation.annotationlocation;
13
14 @MyAnn_22 @com.puppycrawl.tools.checkstyle.checks.annotation.annotationlocation.MyAnn_2
15 (value = "")
16 class InputAnnotationLocationIncorrect2One
17 {
18
19 @MyAnn_22 @MyAnnotation_12(value = "")
20 public int a;
21
22 @MyAnnotation_12(value = "") public int b;
23
24 @MyAnn_22
25 @MyAnnotation_12
26 (value = "")
27 public int c;
28
29 @MyAnnotation_12(value = "")
30 public int d;
31
32 @MyAnn_22
33 @MyAnnotation_12
34 (value = "")
35 public InputAnnotationLocationIncorrect2One() {}
36
37 @MyAnnotation_12("foo") @MyAnn_22 void foo1() {}
38
39 @MyAnnotation_12(value = "")
40 @MyAnn_22
41 void foo2() {}
42
43 @MyAnnotation_12(value = "")
44 @MyAnn_22
45 @MyAnnotation_32
46 @MyAnnotation_42
47 class InnerClass
48 {
49 @MyAnn_22 @MyAnnotation_12
50 (value = "")
51 public int a;
52
53 @MyAnnotation_12(value = "") public int b;
54
55 @MyAnn_22
56 @MyAnnotation_12
57 (value = "")
58 public int c;
59
60 @MyAnnotation_12(value = "")
61 public int d;
62
63 @MyAnn_22
64 @MyAnnotation_12(value = "") public InnerClass()
65 {
66
67 }
68 @MyAnnotation_12(value = "")
69 @MyAnn_22
70 void foo1() {}
71
72 @MyAnnotation_12(value = "")
73 @MyAnn_22
74 void foo2() {}
75 }
76
77 @MyAnnotation_12(value = "")
78 @MyAnn_22
79 InnerClass anon = new InnerClass()
80 {
81 @MyAnn_22 @MyAnnotation_12(value = "") public int a;
82
83 @MyAnnotation_12(value = "") public int b;
84
85 @MyAnn_22
86 @MyAnnotation_12(value = "")
87 public int c;
88
89 @MyAnnotation_12(value = "")
90 public int d;
91
92 @MyAnnotation_12(value = "")
93 @MyAnn_22 void foo1() {}
94
95 @MyAnnotation_12(value = "")
96 @MyAnn_22
97 void foo2() {}
98
99 @MyAnnotation_12(value = "") void foo42() {}
100 };
101
102 }
103
104
105 @interface MyAnnotation_12 {
106
107 String value();}
108
109 @interface MyAnn_22 {}
110
111 @interface MyAnnotation_32 {}
112
113 @interface MyAnnotation_42 {}
114
115 @interface MyAnn_2 {
116
117 String value();}