- 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 - 28
 - 29
 - 30
 - 31
 - 32
 - 33
 
                        public class Tree {
    
    ...
    public static int treeDepth;
    ...
    public static void runDepthTree(Node start, String method) {
//        System.out.println("looking at " + start);
        ++treeDepth;
        Statement statement = buildStatement(start, method);
        try {
            statement.execute();
        }
        catch (Exception e) { 
            String msg = start + " ERROR at tree depth= " + treeDepth;
            
            System.out.println(); 
        }
        Node[] nodes = start.getChildren();
        if (nodes != null) {
            int count = start.getComponentCount();
            for (int i = 0; i<count; i++)  {
                runDepthTree((Node)nodes[i], method); // recurse
            }
        }
        --treeDepth;
    }
    ...
}
                                 
        
Комментарии (3) RSS
Добавить комментарий