1 package com.puppycrawl.tools.checkstyle.annotation;
2
3
4
5
6 @MyAnnotation2 @MyAnnotation1
7 (value = "")
8 class InputIncorrectAnnotationLocation
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 InputIncorrectAnnotationLocation() {}
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
101 @interface MyAnnotation1 {
102
103 String value();}
104
105 @interface MyAnnotation2 {}
106
107 @interface MyAnnotation3 {}
108
109 @interface MyAnnotation4 {}