1 package com.google.checkstyle.test.chapter4formatting.rule4841indentation;
2
3 import java.util.Map;
4 import java.util.ArrayList;
5
6 public abstract class InputIndentationCorrect {
7
8 static int i;
9
10 int[] c = {1, 2, 3,
11 4, 5, 6};
12
13 int b;
14
15 static {
16 i = 0;
17 }
18
19 {
20 b = 2;
21 }
22
23 private static abstract class RangesMatcher {
24
25 private static final String ZEROES = "0\u0660\u06f0"
26 + "\u0c66\u0ce6"
27 + "\u1c40\u1c50";
28
29 public static final InputIndentationCorrect JAVA_LETTER_OR_DIGIT =
30 new InputIndentationCorrect() {
31 @Override public boolean matches(char c) {
32 return Character.isLetterOrDigit(c);
33 }
34 };
35
36
37 public static final InputFastMatcher NONE =
38 new InputFastMatcher() {
39 @Override public boolean matches(char c) {
40 return false;
41 }
42
43 @Override public String replaceFrom(CharSequence seq,
44 CharSequence repl) {
45 checkNotNull(repl);
46 return seq.toString();
47 }
48
49 private void checkNotNull(CharSequence replacement) {}
50
51 @Override public String collapseFrom(CharSequence sequence,
52 char replacement) {
53 return sequence.toString();
54 }
55
56 @Override
57 public String trimTrailingFrom(CharSequence sequence) {
58 return sequence.toString();
59 }
60 };
61 }
62
63 public boolean matches(char c) {
64 return false;
65 }
66
67 public void foo() {
68 int i = 0;
69 for (; i < 9; i++) {
70 if (veryLongLongLongCondition()
71 || veryLongLongLongCondition2()) {
72 someFooMethod("longString", "veryLongString",
73 "superVeryExtraLongString");
74 if (veryLongLongLongCondition()) {
75 while (veryLongLongLongCondition2()
76 && veryLongLongLongCondition2()) {
77 try {
78 doSmth();
79 } catch (Exception e) {
80 throw new AssertionError(e);
81 }
82 }
83 }
84 }
85 }
86 }
87
88 public boolean veryLongLongLongCondition() {
89 if (veryLongLongLongCondition2()) {
90 return true;
91 }
92 return false;
93 }
94
95 public boolean veryLongLongLongCondition2() {
96 return false;
97 }
98
99 public void someFooMethod(String longString,
100 String superLongString, String exraSuperLongString) {}
101
102 public void fooThrowMethod()
103 throws Exception {
104
105 }
106
107 public void doSmth() {
108 for (int h
109 : c) {
110 someFooMethod("longString", "veryLongString",
111 "superVeryExtraLongString");
112 }
113 }
114 }