@Override
    public Object plugin(Object target) {
        if (reusePreparedStatements && target instanceof BatchExecutor) {
            target = replaceBatchExecutor((BatchExecutor) target);
        }
        if (reusePreparedStatements && target instanceof CachingExecutor) {
            try {
                Object delegate = cachingExecutorDelegate.get(target);
                if (delegate instanceof BatchExecutor) {
                    cachingExecutorDelegate.set(target, replaceBatchExecutor((BatchExecutor) delegate));
                }
            } catch (IllegalAccessException e) {
                throw new ExecutorException(MSG_ERROR_ACCESSING_DELEGATE, e);
            }
        }
        return target instanceof Executor
                ? Plugin.wrap(target, new UpdateSplitterPlugin(splitter, skipEmptyStatements))
                : target;
    }