View Javadoc
1   /*
2   RightCurly
3   option = ALONE
4   tokens = CLASS_DEF, METHOD_DEF, CTOR_DEF, ANNOTATION_DEF, ENUM_DEF, INTERFACE_DEF
5   
6   
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.blocks.rightcurly;
10  
11  public class InputRightCurlyTestOptAloneBlocksWithSemi {
12  
13      public void testMethod() {}; // violation ''}' at column 31 should be alone on a line'
14  
15      public void testMethod1() {
16      }; // violation ''}' at column 5 should be alone on a line'
17  
18      public class TestClass {}; // violation ''}' at column 29 should be alone on a line'
19  
20      public class TestClass1 {
21      }; // violation ''}' at column 5 should be alone on a line'
22  
23      public class TestClass2 {
24          public TestClass2() {}; // violation ''}' at column 30 should be alone on a line'
25  
26          public TestClass2(String someValue) {
27          }; // violation ''}' at column 9 should be alone on a line'
28      }
29  
30      public void testMethod11() {
31      }
32      ;
33  
34      public @interface TestAnnnotation5 {
35          String someValue(); }; // violation ''}' at column 29 should be alone on a line'
36  
37      public @interface TestAnnotation6 {}; // violation ''}' at column 40 should be alone on a line'
38  
39      public @interface TestAnnotation7 {
40          String someValue();
41      }; // violation ''}' at column 5 should be alone on a line'
42  
43      public @interface TestAnnotation8 { String someValue();
44      }; // violation ''}' at column 5 should be alone on a line'
45      // violation below ''}' at column 61 should be alone on a line'
46      public @interface TestAnnotation9 { String someValue(); };
47  
48      enum TestEnum{}; // violation ''}' at column 19 should be alone on a line'
49  
50      enum TestEnum1{
51          SOME_VALUE;}; // violation ''}' at column 20 should be alone on a line'
52  
53      enum TestEnum2 { SOME_VALUE; }; // violation ''}' at column 34 should be alone on a line'
54  
55      enum TestEnum3{
56          SOME_VALUE;
57      }; // violation ''}' at column 5 should be alone on a line'
58  
59      enum TestEnum4{ SOME_VALUE;
60      }; // violation ''}' at column 5 should be alone on a line'
61  
62      interface Interface1
63      {
64          int i = 1;
65          public void meth1(); }; // violation ''}' at column 30 should be alone on a line'
66  
67      interface Interface3 {
68          void display();
69          interface Interface4 {
70              void myMethod();
71          };}; // 2 violations
72  
73      interface InterfaceEndingWithSemiColon2 {
74          public void fooEmpty();
75      }; // violation ''}' at column 5 should be alone on a line'
76  }