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)
| 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("_")) { |
no outgoing calls
no test coverage detected