Main { {{ static Cd_graph b; static ClassGraph cg; static public void main(String args[]) throws Exception { cg = new ClassGraph(true, false); b = Cd_graph.parse(System.in); // b.display(); // System.out.println(" done display "); b.test(); System.out.println(" done "); } }} } Cd_graph { void display() bypassing -> *,tail,* to * (DisplayVisitor); {{ void test(){ TraversalGraph tg = new TraversalGraph("from Cd_graph bypassing -> *,rest,* to Adj", Main.cg); System.out.println(tg); tg. traverse(this, new Visitor() { void before(Adj host){ System.out.println(host); } }); } }} }