MCPcopy Create free account
hub / github.com/antlr/codebuff / newArray

Method newArray

corpus/java/training/guava/collect/ObjectArrays.java:48–52  ·  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<T> type, int length)

Source from the content-addressed store, hash-verified

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

Callers 5

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

Calls 2

newArrayMethod · 0.95
newInstanceMethod · 0.45

Tested by

no test coverage detected