MCPcopy Create free account
hub / github.com/Ericsson/proxy / concatArrays

Method concatArrays

src/main/java/com/ericsson/commonlibrary/proxy/Util.java:558–570  ·  view source on GitHub ↗

Concatenate two arrays into one. The passed in arrays will be unaltered. They will only be used in construction of a new array @param firstArray the first array @param varargsArrays the other arrays to concat to one large array @return a new merged array

(final T[] firstArray, final T[]... varargsArrays)

Source from the content-addressed store, hash-verified

556 * @return a new merged array
557 */
558 static <T> T[] concatArrays(final T[] firstArray, final T[]... varargsArrays) {
559 int totalLength = firstArray.length;
560 for (final T[] array : varargsArrays) {
561 totalLength += array.length;
562 }
563 final T[] result = Arrays.copyOf(firstArray, totalLength);
564 int offset = firstArray.length;
565 for (final T[] array : varargsArrays) {
566 System.arraycopy(array, 0, result, offset, array.length);
567 offset += array.length;
568 }
569 return result;
570 }
571
572 static void cleanMethodNameField(Method met) throws NoSuchFieldException, IllegalAccessException {
573 if (met.getName().startsWith("_")) {

Callers 3

delegateInterfaceMethod · 0.95
delegateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected