1 18 19 package org.apache.jmeter.engine.util; 20 21 import java.util.LinkedList ; 22 23 import org.apache.jmeter.testelement.TestElement; 24 import org.apache.jorphan.collections.HashTree; 25 import org.apache.jorphan.collections.HashTreeTraverser; 26 27 30 public class DisabledComponentRemover implements HashTreeTraverser 31 { 32 HashTree tree; 33 LinkedList stack = new LinkedList (); 34 35 public DisabledComponentRemover(HashTree tree) 36 { 37 this.tree = tree; 38 } 39 40 public void addNode(Object node, HashTree subTree) 41 { 42 stack.addLast(node); 43 } 44 45 public void subtractNode() 46 { 47 TestElement lastNode = (TestElement)stack.removeLast(); 48 if(!lastNode.getPropertyAsBoolean(TestElement.ENABLED)) 49 { 50 tree.getTree(stack).remove(lastNode); 51 } 52 } 53 54 public void processPath() 55 { 56 } 57 } 58 | Popular Tags |