this.getGeneratorContext().debug("Implementing method that sends method parameters as request parameters, method: " + method);
final Iterator parameters = method.getParameters().iterator();
while (parameters.hasNext()) {
final MethodParameter parameter = (MethodParameter) parameters.next();
final Type parameterType = parameter.getType();
if (false == this.isSimpleType(parameterType)) {
this.throwUnsupportedParameterTypeException(parameter);
}
}
final NewMethod asyncMethod = this.createCorrespondingAsyncServiceInterfaceMethod(method, asyncServiceInterface,
remoteJsonClient);
final RequestParametersInvokerTemplatedFile body = new RequestParametersInvokerTemplatedFile();
body.setHttpRequestParameterNames(this.getHttpRequestParameterNamesFromMethodAnnotation(method));
body.setInvokerType(this.getInvokerTypeFromMethodAnnotation(method));
body.setParameters(asyncMethod.getParameters());
body.setReturnType(method.getReturnType());
final Iterator newMethodParameters = asyncMethod.getParameters().iterator();
while (newMethodParameters.hasNext()) {
final NewMethodParameter parameter = (NewMethodParameter) newMethodParameters.next();
parameter.setFinal(true);
if (false == newMethodParameters.hasNext()) {
parameter.setName(RequestParametersConstants.REQUEST_PARAMETERS_CALLBACK_PARAMETER);
}
}
asyncMethod.setBody(body);
}