View Javadoc
1   /*
2   EmptyLineSeparator
3   allowNoEmptyLineBetweenFields = (default)false
4   allowMultipleEmptyLines = (default)true
5   allowMultipleEmptyLinesInsideClassMembers = false
6   tokens = (default)PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, \
7            STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF, \
8            COMPACT_CTOR_DEF
9   
10  
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.whitespace.emptylineseparator;
14  
15  public abstract class InputEmptyLineSeparatorMultipleEmptyLinesInside
16  {
17      public InputEmptyLineSeparatorMultipleEmptyLinesInside() {
18          // violation 'There is more than 1 empty line after this line.'
19  
20  
21      }
22  
23      private int counter;
24  
25      private Object obj = null;
26  
27      abstract int generateSrc(String s);
28  
29      static {
30          // violation 'There is more than 1 empty line after this line.'
31  
32  
33      }
34  
35      {
36          // violation 'There is more than 1 empty line after this line.'
37  
38  
39      }
40  
41      private static void foo() { // violation 'There is more than 1 empty line after this line.'
42  
43  
44          // 1 empty line above should cause a violation
45  
46          // violation 'There is more than 1 empty line after this line.'
47  
48  
49  
50          // 2 empty lines above should cause violations
51      }
52  }
53  class // violation ''CLASS_DEF' should be separated from previous line.'
54  SecondClassReturnWithVeryVeryVeryLongName{}