- 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;
}
...
}
bormand 23.05.2013 18:01 # +4
Sh1tM4ker 24.05.2013 19:46 # +1
Мистер Хэнки 27.05.2013 20:22 # +1