soot.jimple.toolkits.pointer.nativemethods
Class JavaLangObjectNative

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

public class JavaLangObjectNative
extends NativeMethodClass


Field Summary
 
Fields inherited from class soot.jimple.toolkits.pointer.nativemethods.NativeMethodClass
helper
 
Constructor Summary
JavaLangObjectNative(NativeHelper helper)
           
 
Method Summary
 void java_lang_Object_clone(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          Creates and returns a copy of this object.
 void java_lang_Object_getClass(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar, ReferenceVariable[] params)
          The return variable is assigned an abstract object represneting all classes (UnknowClassObject) from environment.
 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

JavaLangObjectNative

public JavaLangObjectNative(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_Object_getClass

public void java_lang_Object_getClass(SootMethod method,
                                      ReferenceVariable thisVar,
                                      ReferenceVariable returnVar,
                                      ReferenceVariable[] params)
The return variable is assigned an abstract object represneting all classes (UnknowClassObject) from environment. public final native java.lang.Class getClass();


java_lang_Object_clone

public void java_lang_Object_clone(SootMethod method,
                                   ReferenceVariable thisVar,
                                   ReferenceVariable returnVar,
                                   ReferenceVariable[] params)
Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression: x.clone() != x will be true, and that the expression: x.clone().getClass() == x.getClass() will be true, but these are not absolute requirements. While it is typically the case that: x.clone().equals(x) will be true, this is not an absolute requirement. Copying an object will typically entail creating a new instance of its class, but it also may require copying of internal data structures as well. No constructors are called. NOTE: it may raise an exception, the decision of cloning made by analysis by implementing the ReferneceVariable.cloneObject() method. protected native java.lang.Object clone() throws java.lang.CloneNotSupported