VM_TypeReference[] argTypes = mth.getParameterTypes(); Class[]   argClasses = new Class[argTypes.length]; for (int i=0; i<argClasses.length; i++) { argClasses[i] = argTypes[i].resolve().getClassForType();
Constructor constMethod = java.lang.reflect.JikesRVMSupport.createConstructor(mth); if (!mth.isPublic()) { constMethod.setAccessible(true);
  public static Object invokeInitializer(Class cls, int methodID, VM_Address argAddress,                                          boolean isJvalue, boolean isDotDotStyle)     throws Exception {    // get the parameter list as Java class    VM_Method mth = VM_MemberReference.getMemberRef(methodID).asMethodReference().resolve();    VM_TypeReference[] argTypes = mth.getParameterTypes();    Class[]   argClasses = new Class[argTypes.length];    for (int i=0; i<argClasses.length; i++) {      argClasses[i] = argTypes[i].resolve().getClassForType();    }    Constructor constMethod = cls.getConstructor(argClasses);    if (constMethod==null)      throw new Exception("Constructor not found");        Object argObjs[];    if (isJvalue) {      argObjs = packageParameterFromJValue(mth, argAddress);    } else {      if (isDotDotStyle) {        //-#if RVM_FOR_AIX        VM_Address varargAddress = pushVarArgToSpillArea(methodID, false);        argObjs = packageParameterFromVarArg(mth, varargAddress);        //-#endif                //-#if RVM_FOR_LINUX || RVM_FOR_OSX        // pass in the frame pointer of glue stack frames        // stack frame looks as following:        //      this method ->         //        //      native to java method ->        //        //      glue frame ->        //        //      native C method ->        VM_Address gluefp = VM_Magic.getCallerFramePointer(VM_Magic.getCallerFramePointer(VM_Magic.getFramePointer()));         argObjs = packageParameterFromDotArgSVR4(mth, gluefp, false);        //-#endif      } else {        // var arg        //-#if RVM_FOR_AIX        argObjs = packageParameterFromVarArg(mth, argAddress);        //-#endif        //-#if RVM_FOR_LINUX || RVM_FOR_OSX        argObjs = packageParameterFromVarArgSVR4(mth, argAddress);        //-#endif      }    }    // construct the new object    return constMethod.newInstance(argObjs);  }