import EDU.neu.ccs.demeter.dj.*; class Main { public static void main(String[] args) { ClassGraph cg = new ClassGraph(); // constructed from *.java A a = new A(new B(new D()), new C()); // cg.traverse(a, new StrategyGraph("A->D"), new MyVisitor()); // Strategy sg = new Strategy("from A to D"); Strategy sg = new Strategy( "from A bypassing B to C" ); Strategy sg2 = new Strategy( "from A bypassing X via B bypassing Y to C" ); Strategy sg3 = new Strategy( "from A bypassing {Q, ->X,y,Y, ->Y,x1,X1} via B bypassing {Y,Y1} to C" ); TraversalGraph tg = TraversalGraph.compute(cg, sg); tg.traverse(a, new MyVisitor()); System.out.println("Traversal Graph for from A to D"); System.out.println(tg); } }