soot.jimple.toolkits.pointer.nativemethods
Class JavaLangReflectFieldNative

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

public class JavaLangReflectFieldNative
extends NativeMethodClass


Field Summary
 
Fields inherited from class soot.jimple.toolkits.pointer.nativemethods.NativeMethodClass
helper
 
Constructor Summary
JavaLangReflectFieldNative(NativeHelper helper)
           
 
Method Summary
 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.
 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.
 
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(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_reflect_Field_set

public 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 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;