View Javadoc
1   /*
2   LeftCurly
3   option = NLOW
4   ignoreEnums = (default)true
5   tokens = (default)ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, \
6            ENUM_DEF, INTERFACE_DEF, LAMBDA, LITERAL_CASE, LITERAL_CATCH, \
7            LITERAL_DEFAULT, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, \
8            LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, \
9            METHOD_DEF, OBJBLOCK, STATIC_INIT, RECORD_DEF, COMPACT_CTOR_DEF
10  
11  
12  */
13  
14  package com.puppycrawl.tools.checkstyle.checks.blocks.leftcurly;
15  
16  public class InputLeftCurlyTestCoverageIncrease {
17      // inner interfaces with different scopes
18  
19  
20      private interface PrivateInterface
21      { // violation ''{' at column 5 should be on the previous line'
22          public String CA = "CONST A";
23          String CB = "CONST b";
24  
25          public void ma();
26          void mb();
27      }
28  
29      interface PackageInnerInterface
30      { // violation ''{' at column 5 should be on the previous line'
31          public String CA = "CONST A";
32          String CB = "CONST b";
33  
34          public void ma();
35          void mb();
36      }
37  
38      protected interface ProtectedInnerInterface
39      { // violation ''{' at column 5 should be on the previous line'
40          public String CA = "CONST A";
41          String CB = "CONST b";
42  
43          public void ma();
44          void mb();
45      }
46  
47      public interface PublicInnerInterface
48      { // violation ''{' at column 5 should be on the previous line'
49          public String CA = "CONST A";
50          String CB = "CONST b";
51  
52          public void ma();
53          void mb();
54      }
55  
56      private
57      class
58   MyClass1
59    {
60      }
61      class
62      MyClass2 { // violation ''{' at column 14 should be on a new line'
63      }
64  
65      private
66      interface
67      MyInterface1 { // violation ''{' at column 18 should be on a new line'
68      }
69  
70      interface
71      MyInterface2 { // violation ''{' at column 18 should be on a new line'
72      }
73  
74      protected
75      enum
76      MyEnum { // violation ''{' at column 12 should be on a new line'
77      }
78  
79      private
80      @interface
81      MyAnnotation { // violation ''{' at column 18 should be on a new line'
82      }
83  }