1
2
3
4
5
6
7
8
9
10 package com.puppycrawl.tools.checkstyle.checks.annotation.annotationonsameline;
11
12 public class InputAnnotationOnSameLineCheckTokensOnMethodAndVar {
13
14 @Annotation3 int x;
15
16 int y;
17
18
19
20 @Annotation3
21 @SomeClass2.Annotation
22 @java.lang.Deprecated
23 public int getX() {
24 return (int) x;
25 }
26
27
28 @Annotation4 @Annotation3
29 public int field;
30
31 public
32 @Annotation3 int field2;
33 }
34
35 class SomeClass2 {
36
37 @interface Annotation {}
38 }
39
40 @interface Annotation3 {}
41 @interface Annotation4 {}