MCPcopy Index your code
hub / github.com/davidgiven/luje / arraycopy

Method arraycopy

lib/java/lang/System.java:39–59  ·  view source on GitHub ↗

Copies the number of length elements of the Array src starting at the offset srcPos into the Array dest at the position destPos. @param src the source array to copy the content. @param srcPos the starting index of the content in {@code s

(Object src, int srcPos, Object dest, int destPos,
            int length)

Source from the content-addressed store, hash-verified

37 * to be copied.
38 */
39 public static void arraycopy(Object src, int srcPos, Object dest, int destPos,
40 int length) {
41 // sending getClass() to both arguments will check for null
42 Class<?> type1 = src.getClass();
43 Class<?> type2 = dest.getClass();
44 if (!type1.isArray() || !type2.isArray()) {
45 throw new ArrayStoreException();
46 }
47 Class<?> componentType1 = type1.getComponentType();
48 Class<?> componentType2 = type2.getComponentType();
49 if (!componentType1.isPrimitive()) {
50 if (componentType2.isPrimitive()) {
51 throw new ArrayStoreException();
52 }
53 } else {
54 if (componentType2 != componentType1) {
55 throw new ArrayStoreException();
56 }
57 }
58 arraycopyImpl(src, srcPos, dest, destPos, length);
59 }
60
61 public static native void arraycopyImpl(Object src, int srcPos, Object dest, int destPos,
62 int length);

Callers 15

firstPermutationMethod · 0.95
countFlipsMethod · 0.95
StringMethod · 0.95
concatMethod · 0.95
getCharsMethod · 0.95
replaceMethod · 0.95
toCharArrayMethod · 0.95
enlargeBufferMethod · 0.95
append0Method · 0.95
delete0Method · 0.95
deleteCharAt0Method · 0.95
getCharsMethod · 0.95

Calls 5

arraycopyImplMethod · 0.95
getClassMethod · 0.80
isArrayMethod · 0.80
getComponentTypeMethod · 0.80
isPrimitiveMethod · 0.80

Tested by

no test coverage detected