View Javadoc
1   /*
2   EmptyLineSeparator
3   allowNoEmptyLineBetweenFields = (default)false
4   allowMultipleEmptyLines = false
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 class InputEmptyLineSeparatorEnumMembers {}
16  
17  enum A {
18      ONE("one"),
19      TWO("two");
20  
21  
22      private final String str; // violation ''VARIABLE_DEF' has more than 1 empty lines before.'
23  
24      private String otherString; // ok
25  
26  
27      private String thirdString; // violation ''VARIABLE_DEF' has more than 1 empty lines before.'
28      private String fourth; // violation ''VARIABLE_DEF' should be separated from previous line.'
29  
30  
31      A(String s) { // violation ''CTOR_DEF' has more than 1 empty lines before.'
32          this.str = s;
33      }
34  
35      private String fifth;
36      static { // violation ''STATIC_INIT' should be separated from previous line.'
37      }
38  
39  
40      static { // violation ''STATIC_INIT' has more than 1 empty lines before.'
41  
42      }
43  
44      public String getStr() {
45          return str;
46      }
47  }