final Iterator<ProcessorDefinition> it) {
return new AdviceWithTask() {
public void task() throws Exception {
boolean match = false;
while (it.hasNext()) {
ProcessorDefinition output = it.next();
if (matchBy.match(output)) {
ProcessorDefinition parent = output.getParent();
if (parent != null) {
int index = parent.getOutputs().indexOf(output);
if (index != -1) {
match = true;
Object old = parent.getOutputs().remove(index);
LOG.info("AdviceWith (" + matchBy.getId() + ") : [" + old + "] --> remove");
}
}
}
}