KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > emn > info > eaop > event > Event


1 /* ----------------------------------------------------------------------------
2  * EAOP 1.0, 2002-12-19
3  * (c) 2002 Remi Douence, Mario Sudholt; OBASCO group; EMN/INRIA; France
4  * THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY
5   -------------------------------------------------------------------------- */

6
7 package fr.emn.info.eaop.event;
8
9 import java.util.*;
10 import java.lang.reflect.*;
11 import java.io.*;
12
13 /**
14  * Execution point are represented as events. This class is the super
15  * class of every events.
16  *
17  * @author Remi Douence
18  * @version 1.0
19  */

20
21 public class Event {
22
23     public static int timeStampGenerator = 0;
24     public static Stack names = new Stack();
25     static {
26     Event.names.push("base program");
27     }
28
29     public Thread JavaDoc thread;
30     public String JavaDoc name;
31     public int timeStamp;
32
33     public Event(Thread JavaDoc thread) {
34     this.thread = thread;
35     this.name = (String JavaDoc)(Event.names.peek());
36     this.timeStamp = Event.timeStampGenerator++;
37     }
38     public String JavaDoc toString() {
39     return this.thread.toString() + " " + this.name + " " + this.timeStamp;
40     }
41 }
42
43
Popular Tags