Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: local/Foo.java


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