KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > TryTest


1 package test;
2
3 import alt.jiapi.*;
4 /**
5  * Class description. tryTest
6  * @author Mika Riekkinen
7  */

8 public class TryTest extends InstrumentorTest {
9     /**
10      */

11     public static void main(String JavaDoc [] args) throws Exception JavaDoc {
12         TryTest tryTest = new TryTest();
13         tryTest.run(args);
14     }
15
16     public TryTest() throws Exception JavaDoc {
17         TryBlockInstrumentor tbi = new TryBlockInstrumentor();
18         Patch mcp = new MethodCallPatch(this);
19
20         InstrumentationDescriptor id = new InstrumentationDescriptor();
21         id.addInstrumentation(tbi, mcp);
22         addInclusionRules(id, getInclusionRules());
23         addExclusionRules(id, getExclusionRules());
24
25         ctx.addInstrumentationDescriptor(id);
26     }
27 }
28
Popular Tags