MCPcopy
hub / github.com/google/guava / newArray

Method newArray

guava/src/com/google/common/collect/ObjectArrays.java:49–53  ·  view source on GitHub ↗

Returns a new array of the given length with the specified component type. @param type the component type @param length the length of the new array

(Class<@NonNull T> type, int length)

Source from the content-addressed store, hash-verified

47 * @param length the length of the new array
48 */
49 @GwtIncompatible // Array.newInstance(Class, int)
50 @SuppressWarnings("unchecked")
51 public static <T extends @Nullable Object> T[] newArray(Class<@NonNull T> type, int length) {
52 return (T[]) Array.newInstance(type, length);
53 }
54
55 /**
56 * Returns a new array of the given length with the same type as a reference array.

Callers 15

toArrayMethod · 0.95
toArrayMethod · 0.95
concatMethod · 0.95
toArrayImplMethod · 0.95
toArrayMethod · 0.95

Calls 2

newInstanceMethod · 0.45
copyOfMethod · 0.45