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] = SupportedParameterTypes.resolveParameter(methodParameter.getType(),
request, response, locale);
} else if (ExtDirectStoreReadRequest.class.isAssignableFrom(methodParameter.getType())) {
parameters[paramIndex] = directStoreReadRequest;
} else if (directStoreModifyRecords != null && methodParameter.getCollectionType() != null) {
parameters[paramIndex] = directStoreModifyRecords;
} else if (methodParameter.isHasRequestParamAnnotation()) {
parameters[paramIndex] = handleRequestParam(null, remainingParameters, methodParameter);
} else if (directRequest.getData() != null && directRequest.getData().length > jsonParamIndex) {
Object jsonParam = directRequest.getData()[jsonParamIndex];
if (methodParameter.getType().getClass().equals(String.class)) {
parameters[paramIndex] = ExtDirectSpringUtil.serializeObjectToJson(jsonParam);
} else if (methodParameter.getType().isPrimitive()) {
parameters[paramIndex] = jsonParam;
} else {
parameters[paramIndex] = ExtDirectSpringUtil.deserializeJsonToObject(
ExtDirectSpringUtil.serializeObjectToJson(jsonParam), methodParameter.getType());
}
jsonParamIndex++;
} else {
throw new IllegalArgumentException(