env.recordException(new NoSuchMethodError()); return 0;
env.recordException(new NoSuchMethodError(klass + ": " + methodName + " " + sigName)); return 0;
  private static int GetMethodID(int envJREF, int classJREF,                                  VM_Address methodNameAddress, VM_Address methodSigAddress) {    if (traceJNI) VM.sysWrite("JNI called: GetMethodID  \n");    VM_JNIEnvironment env = VM_Thread.getCurrentThread().getJNIEnv();    try {      // obtain the names as String from the native space      String methodString = VM_JNIEnvironment.createStringFromC(methodNameAddress);      VM_Atom methodName = VM_Atom.findOrCreateAsciiAtom(methodString);      String sigString = VM_JNIEnvironment.createStringFromC(methodSigAddress);      VM_Atom sigName  = VM_Atom.findOrCreateAsciiAtom(sigString);      // get the target class       Class jcls = (Class) env.getJNIRef(classJREF);      VM_Type type = java.lang.JikesRVMSupport.getTypeForClass(jcls);      if (!type.isClassType()) {	env.recordException(new NoSuchMethodError());        return 0;      }	      VM_Class klass = type.asClass();      if (!klass.isInitialized()) {	VM_Runtime.initializeClassForDynamicLink(klass);      }      // Find the target method      VM_Method meth = null;      if (methodString.equals("<init>")) {	meth = klass.findInitializerMethod(sigName);      } else {	meth = klass.findVirtualMethod(methodName, sigName);      }      if (meth == null) {        env.recordException(new NoSuchMethodError());        return 0;      }	      if (traceJNI) VM.sysWrite("got method " + meth + "\n");      return meth.getId();    } catch (Throwable unexpected) {      env.recordException(unexpected);      return 0;    }  }