KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > InputArrayTypeStyle


1 ////////////////////////////////////////////////////////////////////////////////
2
// Test case file for checkstyle.
3
// Created: 2001
4
////////////////////////////////////////////////////////////////////////////////
5
package com.puppycrawl.tools.checkstyle;
6
7 /**
8  * Test case for ArrayTypeStyle (Java vs C)
9  * @author lkuehne
10  **/

11 public class InputArrayTypeStyle
12 {
13     private int[] javaStyle = new int[0];
14     private int cStyle[] = new int[0];
15
16     public static void mainJava(String JavaDoc[] aJavaStyle)
17     {
18     }
19
20     public static void mainC(String JavaDoc aCStyle[])
21     {
22         final int[] blah = new int[0];
23         final boolean isOK1 = aCStyle instanceof String JavaDoc[];
24         final boolean isOK2 = aCStyle instanceof java.lang.String JavaDoc[];
25         final boolean isOK3 = blah instanceof int[];
26     }
27
28     public class Test
29     {
30         public Test[]
31             variable;
32
33         public Test[]
34             getTests()
35         { // we shouldn't check methods because there is no alternatives.
36
return null;
37         }
38
39         public Test[] getNewTest()
40         {
41             return null;
42         }
43     }
44 }
45
Popular Tags