soot.jimple.toolkits.pointer.nativemethods
Class JavaLangReflectFieldNative

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

public class JavaLangReflectFieldNative
extends NativeMethodClass


Constructor Summary
JavaLangReflectFieldNative(Singletons.Global g)
           
 
Method Summary
static void java_lang_reflect_Field_get(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          Returns the value of the field represented by this Field, on the specified object.
static void java_lang_reflect_Field_set(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          NOTE: make all fields pointing to @param1 public native void set(java.lang.Object, java.lang.Object) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException;
 void simulateMethod(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          Implements the abstract method simulateMethod.
static JavaLangReflectFieldNative 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

JavaLangReflectFieldNative

public JavaLangReflectFieldNative(Singletons.Global g)
Method Detail

v

public static JavaLangReflectFieldNative 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_reflect_Field_set

public static void java_lang_reflect_Field_set(SootMethod method,
                                               ReferenceVariable thisVar,
                                               ReferenceVariable returnVar,
                                               ReferenceVariable[] params)
NOTE: make all fields pointing to @param1 public native void set(java.lang.Object, java.lang.Object) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException;

java_lang_reflect_Field_get

public static void java_lang_reflect_Field_get(SootMethod method,
                                               ReferenceVariable thisVar,
                                               ReferenceVariable returnVar,
                                               ReferenceVariable[] params)
Returns the value of the field represented by this Field, on the specified object. The value is automatically wrapped in an object if it has a primitive type. NOTE: this really needs precise info of @this (its name). conservative way, makes return value possibly point to universal objects. public native java.lang.Object get(java.lang.Object) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException;