| That's the idea, but you have some bugs here since when you remove a
| transformer, you should also remove the corresponding selector and
| parameters:
|
| for (int i = 0; i < this.transformers.size(); /* do not increment here */)
| {
| if (trashTransformerAt(i)) {
| // Release what needs to be
| Transformer transf = (Transformer)this.transformers.get(i);
| ComponentSelector selector =
| (ComponentSelector)this.transformerSelectors.get(i);
| selector.release(transf);
| this.newManager.release(selector);
|
| // Update lists
| this.transformers.remove(i);
| this.transformerSelectors.remove(i);
| this.transformerParams.remove(i);
| this.transformerSources.remove(i);
| } else {
| i++;
| }
| }
I finally chose your way - it's easier and has the better performance. I
also tried to implement the whole thing by overloading addTransformer(),
which - of course - is possible. It seems even much more easy, but I need
the environment for my adaptation logic. Isn't the environment available at
this time of pipeline building, or can I get it from somewhere?
Stefan