@SuppressWarnings("unchecked")
    public static <T> T[] combine(Class<T> type, T first, T... rest) {
        T[] array = (T[]) Array.newInstance(type, rest.length + 1);
        array[0] = first;
        System.arraycopy(rest, 0, array, 1, rest.length);
        return array;
    }
ArrayUtils provides array related utility functionality

@author tiwe
querydsl-core/src/main/java/com/querydsl/core/util/ArrayUtils.java