View Javadoc
1   /*
2   SeparatorWrap
3   option = invalid_option
4   tokens = (default)DOT, COMMA
5   
6   
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.whitespace.separatorwrap;
10  
11  public class InputSeparatorWrapForInvalidOption<T extends FooForInvalidOption // ok
12          & BarForInvalidOption> {
13      public void goodCase() throws FooException4IO, BarException4IO
14      {
15          int i = 0;
16          String s = "ffffooooString";
17          s
18                  .isEmpty(); //good wrapping
19          s.isEmpty();
20          try {
21              foo(i, s);
22          } catch (FooException4IO |
23                  BarException4IO e) {}
24          foo(i,
25                  s); //good wrapping
26      }
27      public static void foo(int i, String s) throws FooException4IO, BarException4IO
28      {
29  
30      }
31  }
32  
33  class badCaseForInvalidOption<T extends FooForInvalidOption &  BarForInvalidOption> {
34  
35  
36      public void goodCaseForInvalidOption(int... aFoo) throws FooException4IO, BarException4IO
37      {
38          String s = "ffffooooString";
39          s.
40                  isEmpty(); //bad wrapping
41          try {
42              foo(1, s);
43          } catch (FooException4IO
44                  | BarException4IO e) {}
45  
46          foo(1
47                  ,s);  //bad wrapping
48          int[] i;
49      }
50      public static String foo(int i, String s) throws FooException4IO, BarException4IO
51      {
52          return new StringBuilder("")
53                  .append("", 0, 1)
54                  .append("")
55                  .toString();
56      }
57  }
58  
59  interface FooForInvalidOption {
60  
61  }
62  
63  interface BarForInvalidOption {
64  
65  }
66  
67  class FooException4IO extends Exception {
68  
69  }
70  
71  class BarException4IO extends Exception {
72  
73  }