Term_Bar_list { void print() to * (PrintVisitor); (@ boolean containsVertex(String s) { java.util.Enumeration en = this.elements(); while (en.hasMoreElements()) { String aString = ((Term) en.nextElement()).get_vertex().get_vertex_name().toString(); if (s.equals(aString)) return true; } return false; } @) } Any_vertex_List { void print() to * (PrintVisitor); } FlattenCheckVisitor { {{ private Any_vertex_List commonList; private Term_Bar_list barList; public void setBarList(Term_Bar_list l) { barList = l; } public void setCommonList(Any_vertex_List l) { commonList = l; } void before(Adjacency host) { Ident i = host.get_source().get_vertex_name(); // System.out.println(i); // barList.print(); if (this.barList.containsVertex(i.toString())) { // System.out.println("It Works"); System.out.println(i); Construct_ns aConstr = (Construct_ns) Main.cg1.fetch(host, "from Adjacency to Construct_ns"); aConstr.print(); Any_vertex_List avl = aConstr.get_construct_ns(); Enumeration listPointer = commonList.elements(); //listPointer.print(); while(listPointer.hasMoreElements()) { avl.addElement((Any_vertex) listPointer.nextElement()); } } } }} } CollectVisitor { {{ private Any_vertex_List commonList; private Term_Bar_list barList; FlattenCheckVisitor fcv = new FlattenCheckVisitor(); public static final Strategy sCdGraphAdj = new Strategy("from Cd_graph to Adjacency"); TraversalGraph tg = new TraversalGraph(sCdGraphAdj, Main.cg1); void before(Alternat_ns host) { commonList = host.get_construct_ns(); barList = host.get_alternat_ns(); fcv.setCommonList(commonList); if(!commonList.isEmpty()) { fcv.setBarList(barList); tg.traverse(Main.m, fcv); } while (!commonList.isEmpty()) commonList.nextElement(); } }} }