KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > quilt > cl > MethodXformer


1 /* MethodXformer.java */
2 package org.quilt.cl;
3
4 import org.apache.bcel.generic.ClassGen;
5 import org.apache.bcel.generic.MethodGen;
6
7 /**
8  * Process a MethodGen method before and after graph creation and
9  * 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      * Process method after graph generation and manipulation is
28      * complete.
29      */

30     public void postGraph( ClassGen clazz, MethodGen method);
31
32     /** Get the report name for method processor. */
33     public String JavaDoc getName ();
34     
35     /** Assign a name to the method processor. */
36     public void setName (String JavaDoc name);
37 }
38
Popular Tags