1
2
3
4
5
6
7
8 package com.puppycrawl.tools.checkstyle.checks.arraytypestyle;
9
10 public class InputArrayTypeStyle
11 {
12 private int[] javaStyle = new int[0];
13 private int cStyle[] = new int[0];
14 private int c[] = new int[0];
15
16 public static void mainJava(String[] aJavaStyle)
17 {
18 }
19
20 public static void mainC(String aCStyle[])
21 {
22 final int[] blah = new int[0];
23 final boolean isOK1 = aCStyle instanceof String[];
24 final boolean isOK2 = aCStyle instanceof java.lang.String[];
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 {
36 return null;
37 }
38
39 public Test[] getNewTest()
40 {
41 return null;
42 }
43
44 public Test getOldTest()[]
45 {
46 return null;
47 }
48
49 public Test getOldTests()[][]
50
51
52
53 {
54 return null;
55 }
56
57 public Test[]
58 getMoreTests()[][]
59
60
61
62 {
63 return null;
64 }
65
66 public Test[][] getTests2()
67 {
68 return null;
69 }
70 }
71 public static void foo(java.util.Collection < ? extends InputArrayTypeStyle[] > collection) {}
72 }