KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Foo


1 // $Id: Foo.java,v 1.2 2004/05/12 09:41:38 anicoara Exp $
2
// =====================================================================
3
//
4
// (history at end)
5
//
6

7
8 import ch.ethz.prose.*;
9
10
11
12 // used packages
13
import java.util.*;
14 import java.io.*;
15 import ch.ethz.prose.tools.RemoteProseComponent;
16 /**
17  * Class Foo will be extended by FooAspect
18  *
19  * @version $Revision: 1.2 $
20  * @author Andrei Popovici
21  * @author Angela Nicoara
22  */

23 public
24 class Foo
25 {
26     public void baz(String JavaDoc arg1)
27     {
28     System.err.println ("Called: " + this + ".baz(" + arg1 + ")");
29     }
30
31     public void bar(String JavaDoc arg1)
32     {
33     System.err.println ("Called: " + this + ".bar(" + arg1 + ")");
34     }
35
36     public void barbaz(String JavaDoc arg1, int count)
37     {
38     System.err.println ("Called: " + this + ".barbaz(" + arg1 + "," + count + ")");
39     }
40
41     public static void main(String JavaDoc[] args) throws Exception JavaDoc
42     {
43     ProseSystem.startup();
44     ExampleAspect asp = new ExampleAspect();
45     ProseSystem.getAspectManager().insert(asp);
46
47     Foo obj = new Foo();
48     while(true)
49       {
50         try {Thread.currentThread().sleep(3000);} catch(InterruptedException JavaDoc e){}
51         obj.baz("Hello");
52         obj.bar("Sheherazade");
53         obj.barbaz("Nights",1001);
54         System.err.println("\n");
55       }
56     }
57
58 }
59
60
61 //======================================================================
62
//
63
// $Log: Foo.java,v $
64
// Revision 1.2 2004/05/12 09:41:38 anicoara
65
// Remove the README.RVM file
66
//
67
// Revision 1.1.1.1 2003/07/02 15:30:42 apopovic
68
// Imported from ETH Zurich
69
//
70
// Revision 1.10 2003/05/26 18:32:53 popovici
71
// Minor corrections
72
//
73
// Revision 1.9 2003/05/25 14:44:11 popovici
74
// Small fixes in non-java classes after refactoring
75
//
76
// Revision 1.8 2003/05/05 14:03:14 popovici
77
// renaming from runes to prose
78
//
79
// Revision 1.7 2003/04/17 15:15:01 popovici
80
// Extension->Aspect renaming
81
//
82
// Revision 1.6 2003/03/13 14:20:26 popovici
83
// Tools and modifications for a demo with remote clients
84
//
85
// Revision 1.5 2002/11/28 08:01:33 popovici
86
// New, independent version added
87
//
88
// Revision 1.4 2002/09/23 07:45:47 popovici
89
// ProseSystem.teardown not needed, since VM DEATH
90
//
91
// Revision 1.3 2002/09/21 14:04:35 popovici
92
// Bug 0000010 fixed. Added 'teardown' procedure
93
// in the JVMAI, Jikes & JDK prose implementation
94
//
95
// Revision 1.2 2002/06/07 07:40:24 popovici
96
// Adapted to the ClasseS/DeclarationS, MethodCut, etc.. refactorization
97
//
98
// Revision 1.1 2002/03/27 13:56:39 popovici
99
// Legal and realease changes:
100
// added LEGAL & licenses
101
// added profiles/release
102
// added programs/* scripts for installation
103
// modified project/* files for installation
104
//
105
Popular Tags