01: package net.sf.jdec.util;
02:
03: import net.sf.jdec.reflection.Behaviour;
04:
05: /*
06: * ExecutionState.java Copyright (c) 2006,07 Swaroop Belur
07: *
08: * This program is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public License
10: * as published by the Free Software Foundation; either version 2
11: * of the License, or (at your option) any later version.
12:
13: * This program is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17:
18: * You should have received a copy of the GNU General Public License
19: * along with this program; if not, write to the Free Software
20: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21: *
22: */
23: public class ExecutionState {
24:
25: private static int currentInstructionPosition;
26:
27: private static Behaviour methodContext;
28:
29: public static Behaviour getMethodContext() {
30: return methodContext;
31: }
32:
33: public static void setMethodContext(Behaviour methodContext) {
34: ExecutionState.methodContext = methodContext;
35: }
36:
37: public static int getCurrentInstructionPosition() {
38: return currentInstructionPosition;
39: }
40:
41: public static void setCurrentInstructionPosition(
42: int currentInstructionPosition) {
43: ExecutionState.currentInstructionPosition = currentInstructionPosition;
44: }
45:
46: }
|