KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > xam > TestVisitor


1 /*
2  * TestVisitor.java
3  *
4  * Created on January 6, 2006, 4:40 PM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package org.netbeans.modules.xml.xam;
11
12 import java.util.List JavaDoc;
13
14 /**
15  *
16  * @author Nam Nguyen
17  */

18 public class TestVisitor {
19     
20     public void visit(TestComponent2 c) {
21         visitChildren(c);
22     }
23     
24     protected void visitChildren(TestComponent2 c) {
25         List JavaDoc<TestComponent2> children = c.getChildren();
26         for (int i=0; i<children.size(); i++) {
27             children.get(i).accept(this);
28         }
29     }
30 }
31
Popular Tags