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