Lines Matching refs:componentType

57      * Array.newInstance(componentType, x);
63 * @param componentType the {@code Class} object representing the
68 * {@code componentType} parameter is null
69 * @exception IllegalArgumentException if componentType is {@link
75 public static Object newInstance(Class<?> componentType, int length)
77 return newArray(componentType, length);
83 * If {@code componentType}
86 * {@code componentType} as its component type. If
87 * {@code componentType} represents an array class, the
90 * dimensions of {@code componentType}. In this case, the
92 * {@code componentType}.
97 * @param componentType the {@code Class} object representing the component
103 * {@code componentType} argument is null
105 * argument is a zero-dimensional array, if componentType is {@link
111 public static Object newInstance(Class<?> componentType, int... dimensions)
116 if (componentType == void.class) {
119 if (componentType == null) {
120 throw new NullPointerException("componentType == null");
122 return createMultiArray(componentType, dimensions);
729 private static native Object createMultiArray(Class<?> componentType, int[] dimensions) throws NegativeArraySizeException;
733 * Equivalent to {@code new componentType[size]}.
740 private static Object newArray(Class<?> componentType, int size) throws NegativeArraySizeException {
741 if (!componentType.isPrimitive()) {
742 return createObjectArray(componentType, size);
743 } else if (componentType == char.class) {
745 } else if (componentType == int.class) {
747 } else if (componentType == byte.class) {
749 } else if (componentType == boolean.class) {
751 } else if (componentType == short.class) {
753 } else if (componentType == long.class) {
755 } else if (componentType == float.class) {
757 } else if (componentType == double.class) {
759 } else if (componentType == void.class) {
769 private static native Object createObjectArray(Class<?> componentType, int length) throws NegativeArraySizeException;