1 6 7 package fr.emn.info.eaop; 8 9 import fr.emn.info.eaop.aspect.*; 10 import fr.emn.info.eaop.event.*; 11 12 import java.util.*; 13 import java.lang.reflect.*; 14 import java.io.*; 15 16 25 26 public class Monitor { 27 28 31 public static Monitor monitor = new Monitor(); 32 33 37 public AspectS aspects; 38 39 42 public Stack currentEvent = new Stack(); 43 44 47 public Stack path = new Stack(); 48 49 public Monitor() { 50 55 } 56 57 58 61 public synchronized Event trace(Event e) { 62 return this.traceRecursive(e); 63 } 64 65 70 public Event traceRecursive(Event e) { 71 this.currentEvent.push(e); 72 this.aspects.go(); 74 Event result = (Event)(this.currentEvent.peek()); 76 this.currentEvent.pop(); 77 return result; 78 } 79 80 84 public Event currentEvent() { 85 return (Event)(this.currentEvent.peek()); 86 } 87 } 88 | Popular Tags |