if (!methodParameters.isEmpty()) {
parameters = new Object[methodParameters.size()];
for (int paramIndex = 0; paramIndex < methodParameters.size(); paramIndex++) {
ParameterInfo methodParameter = methodParameters.get(paramIndex);
if (methodParameter.isSupportedParameter()) {
parameters[paramIndex] = SupportedParameters.resolveParameter(methodParameter.getType(), request,
response, locale);
} else if (ExtDirectStoreReadRequest.class.isAssignableFrom(methodParameter.getType())) {
parameters[paramIndex] = ExtDirectStoreReadRequest;
} else if (directStoreModifyRecords != null && methodParameter.getCollectionType() != null) {
parameters[paramIndex] = directStoreModifyRecords;
} else if (methodParameter.isHasRequestParamAnnotation()) {
parameters[paramIndex] = handleRequestParam(null, remainingParameters, methodParameter);
} else if (methodParameter.isHasRequestHeaderAnnotation()) {
parameters[paramIndex] = handleRequestHeader(request, methodParameter);
} else if (remainingParameters != null && remainingParameters.containsKey(methodParameter.getName())) {
Object jsonValue = remainingParameters.get(methodParameter.getName());
parameters[paramIndex] = convertValue(jsonValue, methodParameter);
} else if (directRequest.getData() != null && directRequest.getData() instanceof List
&& ((List<Object>) directRequest.getData()).size() > jsonParamIndex) {
Object jsonValue = ((List<Object>) directRequest.getData()).get(jsonParamIndex);
parameters[paramIndex] = convertValue(jsonValue, methodParameter);