1 package com.google.checkstyle.test.chapter4formatting.rule452indentcontinuationlines;
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, CharSequence repl) {
44 checkNotNull(repl);
45 return seq.toString();
46 }
47
48 private void checkNotNull(CharSequence replacement) {}
49
50 @Override public String collapseFrom(CharSequence sequence,
51 char replacement) {
52 return sequence.toString();
53 }
54
55 @Override
56 public String trimTrailingFrom(CharSequence sequence) {
57 return sequence.toString();
58 }
59 };
60 }
61
62 public boolean matches(char c) {
63 return false;
64 }
65
66 public void foo() {
67 int i = 0;
68 for (; i < 9; i++) {
69 if (veryLongLongLongCondition()
70 || veryLongLongLongCondition2()) {
71 someFooMethod("longString", "veryLongString",
72 "superVeryExtraLongString");
73 if (veryLongLongLongCondition()) {
74 while (veryLongLongLongCondition2()
75 && veryLongLongLongCondition2()) {
76 try {
77 doSmth();
78 } catch (Exception e) {
79 throw new AssertionError(e);
80 }
81 }
82 }
83 }
84 }
85 }
86
87 public boolean veryLongLongLongCondition() {
88 if (veryLongLongLongCondition2()) {
89 return true;
90 }
91 return false;
92 }
93
94 public boolean veryLongLongLongCondition2() {
95 return false;
96 }
97
98 public void someFooMethod(String longString,
99 String superLongString, String exraSuperLongString) {}
100
101 public void fooThrowMethod()
102 throws Exception {
103
104 }
105
106 public void doSmth() {
107 for (int h
108 : c) {
109 someFooMethod("longString", "veryLongString",
110 "superVeryExtraLongString");
111 }
112 }
113 }