01: /* Soot - a J*va Optimization Framework
02: * Copyright (C) 2003 Feng Qian
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the
16: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17: * Boston, MA 02111-1307, USA.
18: */
19:
20: /**
21: * Simulates the native method side effects in class java.lang.Shutdown
22: *
23: * @author Feng Qian
24: * @author <XXX>
25: */package soot.jimple.toolkits.pointer.nativemethods;
26:
27: import soot.*;
28: import soot.jimple.toolkits.pointer.representations.*;
29: import soot.jimple.toolkits.pointer.util.*;
30:
31: public class JavaLangShutdownNative extends NativeMethodClass {
32: public JavaLangShutdownNative(NativeHelper helper) {
33: super (helper);
34: }
35:
36: /**
37: * Implements the abstract method simulateMethod.
38: * It distributes the request to the corresponding methods
39: * by signatures.
40: */
41: public void simulateMethod(SootMethod method,
42: ReferenceVariable this Var, ReferenceVariable returnVar,
43: ReferenceVariable params[]) {
44:
45: String subSignature = method.getSubSignature();
46:
47: {
48: defaultMethod(method, this Var, returnVar, params);
49: return;
50: }
51: }
52:
53: /************************** java.lang.Shutdown *********************/
54: /**
55: * Both methods has NO side effects.
56: *
57: * static native void halt(int);
58: * private static native void runAllFinalizers();
59: */
60:
61: }
|