if (! method.isStatic()) { VM_Class C = VM_Magic.getObjectType(receiver).asClass(); method = C.findVirtualMethod(method.getName(), method.getDescriptor()); }
  public Object invoke(Object receiver, Object args[]) throws IllegalAccessException, 							      IllegalArgumentException, 							      ExceptionInInitializerError,							      InvocationTargetException {    VM_Class declaringClass = method.getDeclaringClass();        // validate "this" argument    if (!method.isStatic()) {      if (receiver == null) throw new NullPointerException();      receiver = JikesRVMSupport.makeArgumentCompatible(declaringClass, receiver);    }        // validate number and types of remaining arguments    VM_TypeReference[] parameterTypes = method.getParameterTypes();    if (args == null) {      if (parameterTypes.length != 0) {	throw new IllegalArgumentException("argument count mismatch");      }    } else if (args.length != parameterTypes.length) {      throw new IllegalArgumentException("argument count mismatch");    }    for (int i = 0, n = parameterTypes.length; i < n; ++i) {      args[i] = JikesRVMSupport.makeArgumentCompatible(parameterTypes[i].resolve(), args[i]);    }    // Accessibility checks    if (!method.isPublic() && !isAccessible()) {      VM_Class accessingClass = VM_Class.getClassFromStackFrame(1);      JikesRVMSupport.checkAccess(method, accessingClass);    }    // Forces initialization of declaring class    if (method.isStatic() && !declaringClass.isInitialized()) {      try {	VM_Runtime.initializeClassForDynamicLink(declaringClass);      } catch (Throwable e) {	ExceptionInInitializerError ex = new ExceptionInInitializerError();	ex.initCause(e);	throw ex;      }    }    // Invoke method    try {      return VM_Reflection.invoke(method, receiver, args);    } catch (Throwable t) {      throw new InvocationTargetException(t,		"While invoking the method:\n\t\"" + method + "\"\n"		+ " on the object:\n\t\"" + receiver + "\"\n"		+ " it threw the exception:\n\t\"" + t + "\"");     }  }