01: // $id: Foo.java,v 1.6 2003/03/13 14:20:26 popovici Exp $
02: // =====================================================================
03: //
04: // (history at end)
05: //
06:
07: package local;
08:
09: import ch.ethz.prose.*;
10:
11: // used packages
12: import java.util.*;
13: import java.io.*;
14:
15: /**
16: * Class Foo will be extended by FooAspect
17: *
18: * @version $Revision: 1.1.1.1 $
19: * @author Andrei Popovici
20: */
21: public class Foo {
22: public void baz(String arg1) {
23: System.err.println("Called: " + this + ".baz(" + arg1 + ")");
24: }
25:
26: public void bar(String arg1) {
27: System.err.println("Called: " + this + ".bar(" + arg1 + ")");
28: }
29:
30: public void barbaz(String arg1, int count) {
31: System.err.println("Called: " + this + ".barbaz(" + arg1 + ","
32: + count + ")");
33: }
34:
35: public static void main(String[] args) throws Exception {
36: ProseSystem.startup();
37:
38: ExampleAspect asp = new ExampleAspect();
39: ProseSystem.getAspectManager().insert(asp);
40:
41: Foo obj = new Foo();
42: while (true) {
43: try {
44: Thread.currentThread().sleep(3000);
45: } catch (InterruptedException e) {
46: }
47: obj.baz("Hello");
48: System.err.println("\n\n");
49: obj.bar("Sheherazade");
50: System.err.println("\n\n");
51: obj.barbaz("Nights", 1001);
52: }
53: }
54:
55: }
56:
57: //======================================================================
58: //
59: // $Log: Foo.java,v $
60: // Revision 1.1.1.1 2003/07/02 15:30:42 apopovic
61: // Imported from ETH Zurich
62: //
63: // Revision 1.4 2003/05/14 08:43:18 andfrei
64: // changed local example to package local
65: //
66: // Revision 1.3 2003/05/05 14:02:47 popovici
67: // renaming from runes to prose
68: //
69: // Revision 1.2 2003/04/27 13:08:56 popovici
70: // Specializers renamed to PointCutter
71: //
72: // Revision 1.1 2003/04/22 16:26:50 andfrei
73: // added a local test aspect
74: //
75: // Revision 1.6 2003/03/13 14:20:26 popovici
76: // Tools and modifications for a demo with remote clients
77: //
78: // Revision 1.5 2002/11/28 08:01:33 popovici
79: // New, independent version added
80: //
81: // Revision 1.4 2002/09/23 07:45:47 popovici
82: // ExtensionSystem.teardown not needed, since VM DEATH
83: //
84: // Revision 1.3 2002/09/21 14:04:35 popovici
85: // Bug 0000010 fixed. Added 'teardown' procedure
86: // in the JVMAI, Jikes & JDK prose implementation
87: //
88: // Revision 1.2 2002/06/07 07:40:24 popovici
89: // Adapted to the ClasseS/DeclarationS, MethodCut, etc.. refactorization
90: //
91: // Revision 1.1 2002/03/27 13:56:39 popovici
92: // Legal and realease changes:
93: // added LEGAL & licenses
94: // added profiles/release
95: // added programs/* scripts for installation
96: // modified project/* files for installation
97: //
|