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