1 6 7 package com.puppycrawl.tools.checkstyle.indentation; 8 import java.util.Arrays ; 9 13 public class InputInvalidMethodIndent { 14 15 16 public InputInvalidMethodIndent() { 17 } 18 19 public InputInvalidMethodIndent(int dummy) 21 { 22 } 23 24 public void method() { 26 } 27 28 public void method2() 30 { 31 } 32 33 public int method2(int x, int y, int w, int h) { 35 return 1; 36 } 37 38 public void method2(int x, int y, int w, int h, 40 int x1, int y1, int w1, int h1) 41 { 42 } 43 44 public void method3(int x, int y, int w, int h, 46 int x1, int y1, int w1, int h1) 47 { 48 System.getProperty("foo"); 49 } 50 51 52 53 public void method4(int x, int y, int w, int h, 55 int x1, int y1, int w1, int h1) 56 { 57 boolean test = true; 58 if (test) { 59 System.getProperty("foo"); 60 } 61 } 62 63 public 64 final 65 void 66 method5() 67 { 68 boolean test = true; 69 if (test) { 70 System.getProperty("foo"); 71 } 72 } 73 74 public 75 final 76 void 77 method6() 78 { 79 boolean test = true; 80 if (test) { 81 System.getProperty("foo"); 82 } 83 } 84 85 public InputInvalidMethodIndent(int dummy, int dummy2) 86 { 87 System.getProperty("foo"); 88 } 89 90 void method6a() 91 { 92 boolean test = true; 93 if (test) { 94 System.getProperty("foo"); 95 } 96 97 System.out.println("methods are: " + 98 Arrays.asList( 99 new String [] {"method"}).toString()); 100 101 102 System.out.println("methods are: " + 103 Arrays.asList( 104 new String [] {"method"}).toString()); 105 106 System.out.println("methods are: " 107 + Arrays.asList( 108 new String [] {"method"}).toString()); 109 110 System.out.println("methods are: " 111 + Arrays.asList( 112 new String [] {"method"}).toString()); 113 114 115 String blah = (String ) System.getProperty( 116 new String ("type")); 117 118 119 String blah1 = (String ) System.getProperty( 120 new String ("type") 121 ); 122 123 System.out.println("methods are: " + Arrays.asList( 124 new String [] {"method"}).toString() 125 ); 126 } 127 128 129 private void myfunc2(int a, int b, int c, int d, int e, int f, int g) { 130 } 131 132 private int myfunc3(int a, int b, int c, int d) { 133 return 1; 134 } 135 136 private void myMethod() 137 { 138 myfunc2(3, 4, 5, 139 6, 7, 8, 9); 140 141 myfunc2(3, 4, method2(3, 4, 5, 6) + 5, 142 6, 7, 8, 9); 143 144 145 150 151 System.out.toString() 152 .equals("blah"); 153 154 155 } 156 157 private void myFunc() 158 throws Exception 159 { 160 } 161 162 void method7() { 163 return; 165 } 166 167 void method8() { 168 throw new RuntimeException (""); 170 } 171 172 public 173 int[] 174 method9() 175 { 176 return null; 177 } 178 } 179 | Popular Tags |