1 package com.puppycrawl.tools.checkstyle.grammar.antlr4;
2
3 public class InputAntlr4AstRegressionExplicitInitialization {
4 private int x = 0;
5 private Object bar = null;
6 private int y = 1;
7 private long y1 = 1 - 1;
8 private long y3;
9 private long y4 = 0L;
10 private boolean b1 = false;
11 private boolean b2 = true;
12 private boolean b3;
13 private String str = "";
14 java.lang.String str1 = null, str3 = null;
15 int ar1[] = null;
16 int ar2[] = new int[1];
17 int ar3[];
18 float f1 = 0f;
19 double d1 = 0.0;
20
21 static char ch;
22 static char ch1 = 0;
23 static char ch2 = '\0';
24 static char ch3 = '\1';
25
26 void method() {
27 int xx = 0;
28 String s = null;
29 }
30 }
31
32 interface interface1{
33 int TOKEN_first = 0x00;
34 int TOKEN_second = 0x01;
35 int TOKEN_third = 0x02;
36 }
37
38 class InputExplicitInit2 {
39 private Bar<String> bar = null;
40 private Bar<String>[] barArray = null;
41 }
42
43 enum InputExplicitInit3 {
44 A,
45 B
46 {
47 private int x = 0;
48 private Bar<String> bar = null;
49 private Bar<String>[] barArray = null;
50 private int y = 1;
51 };
52 private int x = 0;
53 private Bar<String> bar = null;
54 private Bar<String>[] barArray = null;
55 private int y = 1;
56 private Boolean booleanAtt = false;
57 }
58
59 @interface annotation1{
60 int TOKEN_first = 0x00;
61 int TOKEN_second = 0x01;
62 int TOKEN_third = 0x02;
63 }
64
65 class ForEach {
66 public ForEach(java.util.Collection<String> strings)
67 {
68 for(String s : strings)
69 {
70
71 }
72 }
73 }
74
75 class Bar<T> {
76 }
77
78 class Chars {
79 char a;
80 char b = a;
81 byte c = 1;
82 short d = 1;
83 final long e = 0;
84 }
85
86 class Doubles {
87 final double subZero = -0.0;
88 final double nan = Double.NaN;
89 private short shortVariable = 0;
90 private byte bite = 0;
91 }