View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.whitespace.separatorwrap;
2   
3   public class InputSeparatorWrapForTestComma<T extends FooForTestComma
4           & BarForTestComma> {
5       public void goodCase() throws FooExceptionForTestComma, BarExceptionForTestComma
6       {
7           int i = 0;
8           String s = "ffffooooString";
9           s
10                  .isEmpty(); //good wrapping
11          s.isEmpty();
12          try {
13              foo(i, s);
14          } catch (FooExceptionForTestComma |
15                  BarExceptionForTestComma e) {}
16          foo(i,
17                  s); //good wrapping
18      }
19      public static void foo(int i, String s) throws FooExceptionForTestComma, BarExceptionForTestComma
20      {
21  
22      }
23  }
24  
25  class badCaseForTestComma<T extends FooForTestComma &  BarForTestComma> {
26  
27  
28      public void goodCaseForTestComma(int... aFoo) throws FooExceptionForTestComma, BarExceptionForTestComma
29      {
30          String s = "ffffooooString";
31          s.
32                  isEmpty(); //bad wrapping
33          try {
34              foo(1, s);
35          } catch (FooExceptionForTestComma
36                  | BarExceptionForTestComma e) {}
37  
38          foo(1
39                  ,s);  //bad wrapping
40          int[] i;
41      }
42      public static String foo(int i, String s) throws FooExceptionForTestComma, BarExceptionForTestComma
43      {
44          return new StringBuilder("")
45                  .append("", 0, 1)
46                  .append("")
47                  .toString();
48      }
49  }
50  
51  interface FooForTestComma {
52  
53  }
54  
55  interface BarForTestComma {
56  
57  }
58  
59  class FooExceptionForTestComma extends Exception {
60  
61  }
62  
63  class BarExceptionForTestComma extends Exception {
64  
65  }