View Javadoc
1   /*
2   RightCurly
3   option = (default)SAME
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 InputRightCurlyTestOptSameBlocksWithSemi {
12  
13      public void testMethod() {};
14  
15      public void testMethod1() {
16      }; // violation ''}' at column 5 should be alone on a line'
17  
18      public class TestClass {};
19  
20      public class TestClass1 {
21      }; // violation ''}' at column 5 should be alone on a line'
22  
23      public class TestClass2 {
24          public TestClass2() {};
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 have line break before'
36  
37      public @interface TestAnnotation6 {};
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  
46      public @interface TestAnnotation9 { String someValue(); };
47  
48      enum TestEnum{};
49  
50      enum TestEnum1{
51          SOME_VALUE;}; // violation ''}' at column 20 should have line break before'
52  
53      enum TestEnum2 { SOME_VALUE; };
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 have line break before'
66  
67      interface Interface2
68      { int i = 1; public void meth1(); };
69  
70      interface Interface3 {
71          void display();
72          interface Interface4 {
73              void myMethod();
74          };}; // 2 violations
75  
76      interface InterfaceEndingWithSemiColon2 {
77          public void fooEmpty();
78      }; // violation ''}' at column 5 should be alone on a line'
79  }