1 19 20 26 27 package soot.jimple.toolkits.pointer.nativemethods; 28 29 import soot.*; 30 import soot.jimple.toolkits.pointer.representations.*; 31 import soot.jimple.toolkits.pointer.util.*; 32 33 public class JavaIoFileSystemNative extends NativeMethodClass { 34 public JavaIoFileSystemNative( NativeHelper helper ) { super(helper); } 35 36 37 42 public void simulateMethod(SootMethod method, 43 ReferenceVariable thisVar, 44 ReferenceVariable returnVar, 45 ReferenceVariable params[]){ 46 47 String subSignature = method.getSubSignature(); 48 49 if (subSignature.equals("java.io.FileSystem getFileSystem()")) { 50 java_io_FileSystem_getFileSystem(method, thisVar, returnVar, params); 51 return; 52 53 } else { 54 defaultMethod(method, thisVar, returnVar, params); 55 return; 56 57 } 58 } 59 60 65 public 66 void java_io_FileSystem_getFileSystem(SootMethod method, 67 ReferenceVariable thisVar, 68 ReferenceVariable returnVar, 69 ReferenceVariable params[]) { 70 helper.assignObjectTo(returnVar, Environment.v().getFileSystemObject()); 71 } 72 } 73 | Popular Tags |