01: /* GraphXformer.java */
02: package org.quilt.cl;
03:
04: import org.apache.bcel.generic.ClassGen;
05: import org.apache.bcel.generic.MethodGen;
06:
07: /**
08: * Transform the graph, possibly using information from ClassGen
09: * and MethodGen. If fatal errors occur, transformers must issue
10: * a warning message on System.err and either undo any changes or
11: * set cfg to null.
12: *
13: * @author <a href="jddixon@users.sourceforge.net">Jim Dixon</a>
14: */
15: public interface GraphXformer {
16:
17: /**
18: * Apply the transformation to the graph.
19: *
20: * @param cg The class being transformed.
21: * @param method MethodGen for the method being transformed.
22: * @param cfg The method's control flow graph.
23: */
24: public void xform(final ClassGen cg, final MethodGen method,
25: final ControlFlowGraph cfg);
26: /**
27: * Get the name for the transformation. This is a static and so
28: * can't be declared here, but implement it.
29: */
30: // public static String getName();
31: /**
32: * Set a name for the transformation, to allow reports to refer
33: * to it.
34: */
35: // public static void setName(String name);
36: }
|