01: package freemarker.debug;
02:
03: import java.util.EventObject;
04:
05: /**
06: * Event describing a suspension of an environment (ie because it hit a
07: * breakpoint).
08: * @author Attila Szegedi
09: * @version $Id: EnvironmentSuspendedEvent.java,v 1.1.2.1 2006/11/27 07:54:19 szegedia Exp $
10: */
11: public class EnvironmentSuspendedEvent extends EventObject {
12: private static final long serialVersionUID = 1L;
13:
14: private final int line;
15: private final DebuggedEnvironment env;
16:
17: public EnvironmentSuspendedEvent(Object source, int line,
18: DebuggedEnvironment env) {
19: super (source);
20: this .line = line;
21: this .env = env;
22: }
23:
24: /**
25: * The line number in the template where the execution of the environment
26: * was suspended.
27: * @return int the line number
28: */
29: public int getLine() {
30: return line;
31: }
32:
33: /**
34: * The environment that was suspended
35: * @return DebuggedEnvironment
36: */
37: public DebuggedEnvironment getEnvironment() {
38: return env;
39: }
40: }
|