soot.jimple.toolkits.pointer.nativemethods
Class JavaLangSystemNative

java.lang.Object
  |
  +--soot.jimple.toolkits.pointer.nativemethods.NativeMethodClass
        |
        +--soot.jimple.toolkits.pointer.nativemethods.JavaLangSystemNative

public class JavaLangSystemNative
extends NativeMethodClass


Constructor Summary
JavaLangSystemNative(Singletons.Global g)
           
 
Method Summary
static 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.
static void java_lang_System_getCallerClass(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          Undocumented, used by class loading.
static void java_lang_System_initProperties(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: this method is not documented, it should do following:
static 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.
static 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);
static void java_lang_System_setIn0(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: this native method is not documented in JDK API.
static 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.
static JavaLangSystemNative v()
           
 
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(Singletons.Global g)
Method Detail

v

public static JavaLangSystemNative v()

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.
Overrides:
simulateMethod in class NativeMethodClass

java_lang_System_arraycopy

public static 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 static 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 static 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 static 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 static void java_lang_System_initProperties(SootMethod method,
                                                   ReferenceVariable thisVar,
                                                   ReferenceVariable returnVar,
                                                   ReferenceVariable[] params)
NOTE: this method is not documented, it should do following:
Returns:
= System.props; System.props = parameter; private static native java.util.Properties initProperties(java.util.Properties);

java_lang_System_mapLibraryName

public static 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 static void java_lang_System_getCallerClass(SootMethod method,
                                                   ReferenceVariable thisVar,
                                                   ReferenceVariable returnVar,
                                                   ReferenceVariable[] params)
Undocumented, used by class loading. static native java.lang.Class getCallerClass();