class ObjectArrayConverter extends AbstractObjectConverter<Object[]> {

    @Override
    public Object[] convert(Object[] data, boolean isVarargs, Class<?>[] parameterTypes) {
        Object[] result;
        if (isVarargs) {
            result = new Object[parameterTypes.length];

            int lastArgIdx = parameterTypes.length - 1;
            if (lastArgIdx >= 0) {
                System.arraycopy(data, 0, result, 0, lastArgIdx);
            }
            result[lastArgIdx] = convertVararg(data, parameterTypes[lastArgIdx].getComponentType(), lastArgIdx);

        } else {
            result = data;
        }
        checkIfArgumentsMatchParameterTypes(result, parameterTypes);
        return result;
    }

}