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