/* * package protected method, for test purpose */ Map<String, Object> getHoldersResult(Map<String, Object> paras) { Map<String, Object> holders = new HashMap<String, Object>(); Map<String, WebParameterImpl> webParams = this.getWebParams(); for (Map.Entry<String, Object> parasEntry : paras.entrySet()) { WebParameterImpl wisePara = webParams.get(parasEntry.getKey()); if (wisePara != null && (wisePara.getMode() == WebParam.Mode.INOUT || wisePara.getMode() == WebParam.Mode.OUT)) { holders.put(parasEntry.getKey(), parasEntry.getValue()); holders.put(TYPE_PREFIX + parasEntry.getKey(), wisePara.getType()); } } return holders; }
private void initWebParams() { Method method = this.getMethod(); Annotation[][] annotations = method.getParameterAnnotations(); Type[] methodparameterTypes = method.getGenericParameterTypes(); for (int i = 0; i < annotations.length; i++) { for (int j = 0; j < annotations[i].length; j++) { if (annotations[i][j] instanceof WebParam) { WebParam webParaAnno = (WebParam) annotations[i][j]; WebParameterImpl parameter = new WebParameterImpl( methodparameterTypes[i], webParaAnno.name(), i, webParaAnno.mode()); parameters.put(parameter.getName(), parameter); break; } } } }