Lines Matching refs:array
5 import java.lang.reflect.Array;
8 * Test java.lang.reflect.Array.
23 intArray = Array.newInstance(Integer.TYPE, 2);
25 int[] array = (int[]) intArray;
26 array[0] = 5;
27 Array.setInt(intArray, 1, 6);
29 if (Array.getInt(intArray, 0) != 5)
31 if (array[1] != 6)
34 array[2] = 27;
39 if (array.length != Array.getLength(intArray) ||
40 array.length != 2)
53 intArray = Array.newInstance(Integer.TYPE, 0);
54 if (Array.getLength(intArray) != 0)
62 strArray = Array.newInstance(String.class, 2);
64 String[] array = (String[]) strArray;
65 array[0] = "entry zero";
66 Array.set(strArray, 1, "entry one");
68 //System.out.println("array: " + array);
70 if (!"entry zero".equals(Array.get(strArray, 0)))
72 if (!"entry one".equals(array[1]))
75 if (array.length != Array.getLength(strArray) ||
76 array.length != 2)
87 intIntIntArray = Array.newInstance(Integer.TYPE, dimensions);
106 strStrStrArray = Array.newInstance(String.class, dimensions);
134 strStrStrArray = Array.newInstance(String[].class, dimensions2);