1 //////////////////////////////////////////////////////////////////////////////// 2 // Test case file for checkstyle. 3 // Created: 2001 4 //////////////////////////////////////////////////////////////////////////////// 5 package com.puppycrawl.tools.checkstyle.checks.naming.membername; 6 7 /** 8 * Tests having inner types 9 * @author Oliver Burn 10 **/ 11 class InputMemberNameInner 12 { 13 // Ignore - two errors 14 class InnerInner2 15 { 16 // Ignore 17 public int fData; 18 } 19 20 // Ignore - 2 errors 21 interface InnerInterface2 22 { 23 // Ignore - should be all upper case 24 String data = "zxzc"; 25 26 // Ignore 27 class InnerInterfaceInnerClass 28 { 29 // Ignore - need Javadoc and made private 30 public int rData; 31 32 /** needs to be made private unless allowProtected. */ 33 protected int protectedVariable; 34 35 /** needs to be made private unless allowPackage. */ 36 int packageVariable; 37 } 38 } 39 40 /** demonstrate bug in handling static final **/ 41 protected static Object sWeird = new Object(); 42 /** demonstrate bug in handling static final **/ 43 static Object sWeird2 = new Object(); 44 45 /** demonstrate bug in local final variable */ 46 public interface Inter 47 { 48 } 49 50 public static void main() 51 { 52 Inter m = new Inter() 53 { 54 private static final int CDS = 1; 55 56 private int ABC; 57 }; 58 } 59 60 /** annotation field incorrectly named. */ 61 @interface InnerAnnotation 62 { 63 /** Ignore - should be all upper case. */ 64 String data = "zxzc"; 65 } 66 67 /** enum with public member variable */ 68 enum InnerEnum 69 { 70 /** First constant */ 71 A, 72 73 /** Second constant */ 74 B; 75 76 /** Should be private */ 77 public int someValue; 78 } 79 }