code: public static <T, U> T[] copyOf(final U[] original, final int newLength, final Class<? extends T[]> newType) {
          final T[] copy = Object[].class.equals(newType) ? (T[]) new Object[newLength] : (T[]) N.newArray(newType.getComponentType(), newLength);
  
          if (N.notNullOrEmpty(original)) {
              copy(original, 0, copy, 0, Math.min(original.length, newLength));
          }
  
          return copy;
      }
docs: @see Arrays#copyOf(Object[], int, Class)
  
  @param original
  @param newLength
  @return