code: private void createQueryFutureMethod(JavaClass jClass,
                                         Method method)
    {
      Class<?> []parameterTypes = method.getParameterTypes();
      Annotation [][]parameterAnns = method.getParameterAnnotations();
  
      int paramLength = parameterTypes.length;
      
      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(),
                    "_messageFactory",
                    MessageFactoryAmp.class);
      
      // code.pushObjectVar(getLength(parameterTypes, resultOffset) + 1);
      
      Timeout timeoutAnn = method.getAnnotation(Timeout.class);
      
      if (timeoutAnn != null) {
        long timeout = timeoutAnn.unit().toMillis(timeoutAnn.value());
        code.pushConstant(timeout);
      }
      
      
      code.pushObjectVar(0);
      code.getField(jClass.getThisClass(),
                    "_serviceRef",
                    ServiceRefAmp.class);
      
      code.pushObjectVar(0);
      code.getField(jClass.getThisClass(),
                    fieldName(method),
                    MethodAmp.class);
      
      partitionMethod(code, parameterTypes, parameterAnns);
      
      pushParameters(code, parameterTypes, parameterAnns,
                     1, 0, paramLength, -1);
  
      if (timeoutAnn != null) {
        code.invokeInterface(MessageFactoryAmp.class,
                             "queryFuture",
                             Object.class, // QueryWithResultMessage.class,
                             long.class,
                             ServiceRefAmp.class,
                             MethodAmp.class,
                             Object[].class);
      }
      else {
        code.invokeInterface(MessageFactoryAmp.class,
                             "queryFuture",
                             Object.class, // QueryWithResultMessage.class,
                             ServiceRefAmp.class,
                             MethodAmp.class,
                             Object[].class);
      }
  
      popReturn(code, method.getReturnType());
  
      code.close();
    }
docs: T foo(X a1, Y a2)
  {
  new AmpQueryMessageActorCompletion(__caucho_getCurrentContext(),
  cont,
  timeout,
  _methodRef,
  new Object[] {a1, a2}).send();
  }