class StringConverter {

    public Object[] convert(String data, boolean isVarargs, Class<?>[] parameterTypes, ConverterContext context, int rowIdx) {
        if (data == null) {
            return new Object[] { null };
        }
        if (parameterTypes.length == 1) {
            if (isVarargs) {
                if (data.isEmpty()) {
                    return new Object[] { Array.newInstance(parameterTypes[0].getComponentType(), 0) };
                }
            } else {
                return new Object[] { convertValue(data, parameterTypes[0], context) };
            }
        }

        String[] splitData = splitBy(data, context.getSplitBy());

        checkArgumentsAndParameterCount(splitData.length, parameterTypes.length, isVarargs, rowIdx);

        return convert(splitData, isVarargs, parameterTypes, context);
    }

}