01: /* MethodXformer.java */
02: package org.quilt.cl;
03:
04: import org.apache.bcel.generic.ClassGen;
05: import org.apache.bcel.generic.MethodGen;
06:
07: /**
08: * Process a MethodGen method before and after graph creation and
09: * manipulation. A QuiltClassLoader can have any number of such
10: * pre/post-processors. The preprocessors will be applied in order
11: * before graph generation and then the postprocessors will be
12: * applied in reverse order after graph manipulation is complete.
13: *
14: * If any fatal errors occur, transformers must issue a warning
15: * message on System.err and either undo any changes or set method
16: * to null.
17: *
18: * @author <a href="jddixon@users.sourceforge.net">Jim Dixon</a>
19: */
20: public interface MethodXformer {
21:
22: /**
23: * Apply processing to method before graph is generated.
24: */
25: public void preGraph(ClassGen clazz, MethodGen method);
26:
27: /**
28: * Process method after graph generation and manipulation is
29: * complete.
30: */
31: public void postGraph(ClassGen clazz, MethodGen method);
32:
33: /** Get the report name for method processor. */
34: public String getName();
35:
36: /** Assign a name to the method processor. */
37: public void setName(String name);
38: }
|