guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java
static <T> T[] copy(Object[] source, int from, int to, T[] arrayOfType) {
    T[] result = newArray(arrayOfType, to - from);
    System.arraycopy(source, from, result, 0, to - from);
    return result;
  }
static <T> T[] copy(Object[] source, int from, int to, T[] arrayOfType) {
    T[] result = newArray(arrayOfType, to - from);
    System.arraycopy(source, from, result, 0, to - from);
    return result;
  }
Equivalent to Arrays.copyOfRange(source, from, to, arrayOfType.getClass()).