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 InputLeftCurlyDefaultTestNlow 17 { // violation ''{' at column 1 should be on the previous line' 18 private interface PrivateInterface 19 { // violation ''{' at column 5 should be on the previous line' 20 } 21 22 interface PackageInnerInterface 23 { // violation ''{' at column 5 should be on the previous line' 24 } 25 26 protected interface ProtectedInnerInterface 27 { // violation ''{' at column 5 should be on the previous line' 28 } 29 30 public interface PublicInnerInterface 31 { // violation ''{' at column 5 should be on the previous line' 32 } 33 34 private 35 class 36 MyClass1 { // violation ''{' at column 14 should be on a new line' 37 } 38 39 class 40 MyClass2 { // violation ''{' at column 14 should be on a new line' 41 } 42 43 private 44 interface 45 MyInterface1 { // violation ''{' at column 18 should be on a new line' 46 } 47 48 interface 49 MyInterface2 { // violation ''{' at column 18 should be on a new line' 50 } 51 52 protected 53 enum 54 MyEnum { // violation ''{' at column 12 should be on a new line' 55 } 56 57 private 58 @interface 59 MyAnnotation { // violation ''{' at column 18 should be on a new line' 60 } 61 62 @Deprecated 63 public 64 class MyClass3 { // violation ''{' at column 20 should be on a new line' 65 } 66 67 public class MyClass4 { 68 void method() { 69 while(true) {/*foo*/} 70 } 71 } 72 }