01: ////////////////////////////////////////////////////////////////////////////////
02: // Test case file for checkstyle.
03: // Created: 2001
04: ////////////////////////////////////////////////////////////////////////////////
05: package com.puppycrawl.tools.checkstyle;
06:
07: /**
08: * Test case for ArrayTypeStyle (Java vs C)
09: * @author lkuehne
10: **/
11: public class InputArrayTypeStyle {
12: private int[] javaStyle = new int[0];
13: private int cStyle[] = new int[0];
14:
15: public static void mainJava(String[] aJavaStyle) {
16: }
17:
18: public static void mainC(String aCStyle[]) {
19: final int[] blah = new int[0];
20: final boolean isOK1 = aCStyle instanceof String[];
21: final boolean isOK2 = aCStyle instanceof java.lang.String[];
22: final boolean isOK3 = blah instanceof int[];
23: }
24:
25: public class Test {
26: public Test[] variable;
27:
28: public Test[] getTests() { // we shouldn't check methods because there is no alternatives.
29: return null;
30: }
31:
32: public Test[] getNewTest() {
33: return null;
34: }
35: }
36: }
|