1 19 20 26 27 package soot.jimple.toolkits.pointer.nativemethods; 28 29 import soot.*; 30 import soot.jimple.toolkits.pointer.representations.*; 31 import soot.jimple.toolkits.pointer.util.*; 32 33 public class JavaLangReflectArrayNative extends NativeMethodClass { 34 public JavaLangReflectArrayNative( NativeHelper helper ) { super(helper); } 35 36 41 public void simulateMethod(SootMethod method, 42 ReferenceVariable thisVar, 43 ReferenceVariable returnVar, 44 ReferenceVariable params[]){ 45 46 String subSignature = method.getSubSignature(); 47 48 if (subSignature.equals("java.lang.Object get(java.lang.Object,int)")) { 49 java_lang_reflect_Array_get(method, thisVar, returnVar, params); 50 return; 51 52 } else if (subSignature.equals("void set(java.lang.Object,int,java.lang.Object)")) { 53 java_lang_reflect_Array_set(method, thisVar, returnVar, params); 54 return; 55 56 } else if (subSignature.equals("java.lang.Object newArray(java.lang.Class,int)")){ 57 java_lang_reflect_Array_newArray(method, thisVar, returnVar, params); 58 return; 59 60 } else if (subSignature.equals("java.lang.Object multiNewArray(java.lang.Class,int[])")){ 61 java_lang_reflect_Array_multiNewArray(method, thisVar, 62 returnVar, params); 63 return; 64 65 } else { 66 defaultMethod(method, thisVar, returnVar, params); 67 return; 68 69 } 70 } 71 72 83 public 84 void java_lang_reflect_Array_get(SootMethod method, 85 ReferenceVariable thisVar, 86 ReferenceVariable returnVar, 87 ReferenceVariable params[]){ 88 throw new NativeMethodNotSupportedException(method); 89 } 90 91 98 public 99 void java_lang_reflect_Array_set(SootMethod method, 100 ReferenceVariable thisVar, 101 ReferenceVariable returnVar, 102 ReferenceVariable params[]){ 103 throw new NativeMethodNotSupportedException(method); 104 } 105 106 113 public 114 void java_lang_reflect_Array_newArray(SootMethod method, 115 ReferenceVariable thisVar, 116 ReferenceVariable returnVar, 117 ReferenceVariable params[]){ 118 throw new NativeMethodNotSupportedException(method); 119 } 120 121 130 public 131 void java_lang_reflect_Array_multiNewArray(SootMethod method, 132 ReferenceVariable thisVar, 133 ReferenceVariable returnVar, 134 ReferenceVariable params[]){ 135 throw new NativeMethodNotSupportedException(method); 136 } 137 138 209 } 210 | Popular Tags |