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