code: private void createAmpResultMethod(JavaClass jClass,
                                       Method method,
                                       int resultOffset)
    {
      String methodName = method.getName();
      Class<?> []parameterTypes = method.getParameterTypes();
      Annotation [][]parameterAnns = method.getParameterAnnotations();
  
      addMethod(method);
      
      CodeWriterAttribute code = createMethodHeader(jClass, method);
      
      code.setMaxLocals(1 + 2 * parameterTypes.length);
      code.setMaxStack(10 + 2 * parameterTypes.length);
  
      code.pushObjectVar(0);
      code.getField(jClass.getThisClass(),
                    fieldName(method),
                    MethodVault.class);
      
      code.pushObjectVar(getLength(parameterTypes, resultOffset) + 1);
      
      int argLen = parameterTypes.length - 1;
      
      pushParameters(code, parameterTypes, parameterAnns, 
                     1, 
                     0, 
                     argLen + 1, // paramLength,
                     resultOffset);
        
      code.invokeInterface(MethodVault.class,
                           "invoke",
                           void.class,
                           Result.class,
                           Object[].class);
  
      code.addReturn();
  
      code.close();
    }
docs: /*
  private Class<?> getBoxedClass(Class<?> cl)
  {
  if (! cl.isPrimitive()) {
  return cl;
  }
  
  if (void.class.equals(cl)) {
  return Void.class;
  }
  else if (boolean.class.equals(cl)) {
  return Boolean.class;
  }
  else if (char.class.equals(cl)) {
  return Character.class;
  }
  else if (byte.class.equals(cl)) {
  return Byte.class;
  }
  else if (short.class.equals(cl)) {
  return Short.class;
  }
  else if (int.class.equals(cl)) {
  return Integer.class;
  }
  else if (long.class.equals(cl)) {
  return Long.class;
  }
  else if (float.class.equals(cl)) {
  return Float.class;
  }
  else if (double.class.equals(cl)) {
  return Double.class;
  }
  else {
  return null;
  }
  }