KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > examples > proxy > tracing > TraceMe2


1 package examples.proxy.tracing;
2
3 import org.codehaus.aspectwerkz.proxy.Proxy;
4
5 public class TraceMe2 {
6
7     public TraceMe2(String JavaDoc name) {
8     }
9
10     void step1() {
11         step2();
12     }
13
14     public void step2() {
15         step3();
16     }
17
18     protected void step3() {
19     }
20
21     public static void main(String JavaDoc[] args) {
22         TraceMe2 traceMe2 = (TraceMe2) Proxy.newInstance(
23                 TraceMe2.class, new Class JavaDoc[]{String JavaDoc.class}, new String JavaDoc[]{"foo"}
24         );
25         traceMe2.step1();
26
27         traceMe2 = (TraceMe2) Proxy.newInstance(TraceMe2.class, new Class JavaDoc[]{String JavaDoc.class}, new String JavaDoc[]{"foo"});
28         traceMe2.step1();
29     }
30 }
31
Popular Tags