boolean skip4Args, boolean isVarArg)
boolean skip4Args, int argtype)
  public static Object packageAndInvoke(Object obj, int methodID, VM_Address argAddress, 					VM_TypeReference expectReturnType, 					boolean skip4Args, boolean isVarArg)     throws Exception {      // VM.sysWrite("JNI CallXXXMethod:  method ID " + methodID + " with args at " +     // 		   VM.intAsHexString(argAddress) + "\n");        VM_Method targetMethod = VM_MemberReference.getMemberRef(methodID).asMethodReference().resolve();    VM_TypeReference returnType = targetMethod.getReturnType();    // VM.sysWrite("JNI CallXXXMethod:  " + targetMethod.getDeclaringClass().toString() +    //		"." + targetMethod.getName().toString() + "\n");    if (expectReturnType==null) {   // for reference return type       if (!returnType.isReferenceType())	throw new Exception("Wrong return type for method: expect reference type instead of " + returnType);          }     else {    // for primitive return type      if (returnType!=expectReturnType) 	throw new Exception("Wrong return type for method: expect " + expectReturnType + 			    " instead of " + returnType);    }      // Repackage the arguments into an array of objects based on the signature of this method    Object[] argObjectArray;    if (isVarArg)      argObjectArray = packageParameterFromVarArg(targetMethod, argAddress);    else      argObjectArray = packageParameterFromJValue(targetMethod, argAddress);    // now invoke the method    Object returnObj = VM_Reflection.invoke(targetMethod, obj, argObjectArray, skip4Args);        return returnObj;  }