soot.jimple.toolkits.pointer.nativemethods
Class JavaLangSystemNative

java.lang.Object
  extended by soot.jimple.toolkits.pointer.nativemethods.NativeMethodClass
      extended by soot.jimple.toolkits.pointer.nativemethods.JavaLangSystemNative

public class JavaLangSystemNative
extends NativeMethodClass


Field Summary
 
Fields inherited from class soot.jimple.toolkits.pointer.nativemethods.NativeMethodClass
helper
 
Constructor Summary
JavaLangSystemNative(NativeHelper helper)
           
 
Method Summary
 void java_lang_System_arraycopy(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
 void java_lang_System_getCallerClass(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          Undocumented, used by class loading.
 void java_lang_System_initProperties(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: this method is not documented, it should do following:
 void java_lang_System_mapLibraryName(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: it is platform-dependent, create a new string, needs to be verified.
 void java_lang_System_setErr0(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: the same explanation as setIn0: System.err = parameter private static native void setErr0(java.io.PrintStream);
 void java_lang_System_setIn0(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: this native method is not documented in JDK API.
 void java_lang_System_setOut0(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: the same explanation as setIn0: G.v().out = parameter private static native void setOut0(java.io.PrintStream);
 void simulateMethod(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          Implements the abstract method simulateMethod.
 
Methods inherited from class soot.jimple.toolkits.pointer.nativemethods.NativeMethodClass
defaultMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaLangSystemNative

public JavaLangSystemNative(NativeHelper helper)
Method Detail

simulateMethod

public void simulateMethod(SootMethod method,
                           ReferenceVariable thisVar,
                           ReferenceVariable returnVar,
                           ReferenceVariable[] params)
Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures.

Specified by:
simulateMethod in class NativeMethodClass

java_lang_System_arraycopy

public void java_lang_System_arraycopy(SootMethod method,
                                       ReferenceVariable thisVar,
                                       ReferenceVariable returnVar,
                                       ReferenceVariable[] params)
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. NOTE: If the content of array is reference type, then it is necessary to build a connection between elements of two arrays dst[] = src[] public static native void arraycopy(java.lang.Object, int, java.lang.Object, int, int);


java_lang_System_setIn0

public void java_lang_System_setIn0(SootMethod method,
                                    ReferenceVariable thisVar,
                                    ReferenceVariable returnVar,
                                    ReferenceVariable[] params)
NOTE: this native method is not documented in JDK API. It should have the side effect: System.in = parameter private static native void setIn0(java.io.InputStream);


java_lang_System_setOut0

public void java_lang_System_setOut0(SootMethod method,
                                     ReferenceVariable thisVar,
                                     ReferenceVariable returnVar,
                                     ReferenceVariable[] params)
NOTE: the same explanation as setIn0: G.v().out = parameter private static native void setOut0(java.io.PrintStream);


java_lang_System_setErr0

public void java_lang_System_setErr0(SootMethod method,
                                     ReferenceVariable thisVar,
                                     ReferenceVariable returnVar,
                                     ReferenceVariable[] params)
NOTE: the same explanation as setIn0: System.err = parameter private static native void setErr0(java.io.PrintStream);


java_lang_System_initProperties

public void java_lang_System_initProperties(SootMethod method,
                                            ReferenceVariable thisVar,
                                            ReferenceVariable returnVar,
                                            ReferenceVariable[] params)
NOTE: this method is not documented, it should do following:


java_lang_System_mapLibraryName

public void java_lang_System_mapLibraryName(SootMethod method,
                                            ReferenceVariable thisVar,
                                            ReferenceVariable returnVar,
                                            ReferenceVariable[] params)
NOTE: it is platform-dependent, create a new string, needs to be verified. public static native java.lang.String mapLibraryName(java.lang.String);


java_lang_System_getCallerClass

public void java_lang_System_getCallerClass(SootMethod method,
                                            ReferenceVariable thisVar,
                                            ReferenceVariable returnVar,
                                            ReferenceVariable[] params)
Undocumented, used by class loading. static native java.lang.Class getCallerClass();