1 package com.google.checkstyle.test.chapter4formatting.rule4854fieldannotations;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6
7 public class InputFieldAnnotations {
8
9 public @interface SomeAnnotation1 {}
10
11
12 public @interface SomeAnnotation2 {}
13
14
15 public @interface SomeAnnotation3 {
16
17 int x();
18 }
19
20
21 @SomeAnnotation1
22 @SomeAnnotation2
23 String name = "Zops";
24
25
26 @SomeAnnotation1 @SomeAnnotation2
27 int age = 19;
28
29
30 @SomeAnnotation1
31 @SomeAnnotation2 String favLanguage = "Java";
32
33
34 @SomeAnnotation1
35 @SomeAnnotation3(x = 90) String favPet = "Dog";
36
37 @SomeAnnotation1 @SomeAnnotation2 boolean test = false;
38
39 @SuppressWarnings("bla") @SomeAnnotation3(x = 0) float pi = 3.14f;
40
41 @SomeAnnotation1 @SomeAnnotation3(x = 14)
42
43 List<String> list = new ArrayList<>();
44
45 @SuppressWarnings("bla")
46 @SomeAnnotation1
47
48 InputFieldAnnotations obj = new InputFieldAnnotations();
49
50
51 @SomeAnnotation1 @SomeAnnotation2
52
53 void test1() {}
54
55 @SomeAnnotation1 @SomeAnnotation2 void test2() {}
56
57
58 @SomeAnnotation3(x = 78) void test3() {}
59
60 }