if (verboseJNI) VM.sysWrite("got method " + mth + "\n");
if (traceJNI) VM.sysWrite("got method " + mth + "\n");
  private static int GetMethodID(int envJREF, int classJREF,                                  VM_Address methodNameAddress, VM_Address methodSigAddress) {    if (verboseJNI) VM.sysWrite("JNI called: GetMethodID  \n");    VM_JNIEnvironment env;    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       env = VM_Thread.getCurrentThread().getJNIEnv();      Class cls = (Class) env.getJNIRef(classJREF);      // search for the method and sig in this class and superclass      VM_Type type = java.lang.JikesRVMSupport.getTypeForClass(cls);      VM_Method mth = null;      if (type.isClassType()) {	        if (methodString.equals("<init>")) {          mth = type.asClass().findInitializerMethod(sigName);        } else {          mth = type.asClass().findVirtualMethod(methodName, sigName);        }      } else {        Throwable e = new NoSuchMethodError();        env.recordException(e);        return 0;      }      if (mth!=null) {	  if (verboseJNI) VM.sysWrite("got method " + mth + "\n");        return mth.getDictionaryId();     // use actual method ID:  index into the VM_MethodDictionary      } else {        env.recordException(new NoSuchMethodError());        return 0;      }    } catch (Throwable unexpected) {      env = VM_Thread.getCurrentThread().getJNIEnv();      env.recordException(unexpected);      return 0;    }  }