@SuppressWarnings("unchecked")
    @Override
    public T[] newInstance(Object... a) {
        if (a.getClass().getComponentType().equals(elementType)) {
            return (T[]) a;
        } else {
            T[] rv = (T[]) Array.newInstance(elementType, a.length);
            System.arraycopy(a, 0, rv, 0, a.length);
            return rv;
        }
    }
{@code ArrayConstructorExpression} extends {@link FactoryExpressionBase} to represent array initializers

@author tiwe

@param <T> component type
querydsl-core/src/main/java/com/querydsl/core/types/ArrayConstructorExpression.java