MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / toArray

Method toArray

src/main/java/wycc/util/ArrayUtils.java:254–259  ·  view source on GitHub ↗

Convert from an array of one kind to an array of another kind. @param type @param src @return

(Class<T> type, S[] src)

Source from the content-addressed store, hash-verified

252 * @return
253 */
254 public static <T,S> T[] toArray(Class<T> type, S[] src) {
255 @SuppressWarnings("unchecked")
256 T[] dest = (T[]) Array.newInstance(type, src.length);
257 System.arraycopy(src, 0, dest, 0, src.length);
258 return dest;
259 }
260
261 /**
262 * Convert from an array of one kind to an array of another kind.

Callers 15

cloneMethod · 0.95
constructMethod · 0.95
cloneMethod · 0.95
constructMethod · 0.95
cloneMethod · 0.95
constructMethod · 0.95
TupleMethod · 0.95
cloneMethod · 0.95
cloneMethod · 0.95
constructMethod · 0.95
ArrayMethod · 0.95
cloneMethod · 0.95

Calls 1

sizeMethod · 0.65

Tested by 7

applyMethod · 0.36
filterMethod · 0.36
filterMethod · 0.36
DiffMethod · 0.36
TestFileMethod · 0.36
FrameMethod · 0.36
ActionMethod · 0.36