Rather than having this complex data structure and logic, why not just let user to pass in a `Function<ChannelPipeline, ChannelPipeline>` (or some similar interface, e.g. ChannelPipelineTransformer) through the builder in the form of. Then the logic is simply

`pipeline = transformer.apply(pipeline);`