static Object getRequestPath(Annotated classMeta, final String name) { final AnnotationData requestMapping = getAnnotationData(classMeta); if (requestMapping != null) { Object value = requestMapping.getValues().get("value"); if (value == null) { value = "/" + name.toLowerCase(); } return value; } else { return "/" + name.toLowerCase(); } }
static String getSummaryFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("summary"); return value.toString(); } else { return "no summary"; } }
static String getDescriptionFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("description"); return value.toString(); } else { return "no description"; } }
static String getReturnDescriptionFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("returnDescription"); return value.toString(); } else { return "no description of return"; } }
static int getCodeFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("code"); return Conversions.toInt(value); } else { return -1; } }
static String getContentTypeFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("contentType"); return Conversions.toString(value); } else { return "application/json"; } }
public static List<RequestMethod> getRequestMethodsByAnnotated(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping == null) { return Collections.singletonList(RequestMethod.GET); } final Object method = requestMapping.getValues().get("method"); if (method == null) { return Collections.singletonList(RequestMethod.GET); } if (method instanceof RequestMethod[]) { //noinspection UnnecessaryLocalVariable final List<RequestMethod> requestMethods = Arrays.asList(((RequestMethod[]) method)); return requestMethods; } if (method instanceof Object[]) { final Object[] methods = (Object[]) method; if (methods.length == 0) { return Collections.singletonList(RequestMethod.GET); } final List<RequestMethod> requestMethods = new ArrayList<>(methods.length); for (Object object : methods) { requestMethods.add(RequestMethod.valueOf(object.toString())); } return requestMethods; } return Collections.singletonList(RequestMethod.valueOf(method.toString())); }
final AnnotationData requestMapping = getAnnotationData(methodAccess);
static String getSummaryFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("summary"); return value.toString(); } else { return "no summary"; } }
static String getDescriptionFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("description"); return value.toString(); } else { return "no description"; } }
static String getReturnDescriptionFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("returnDescription"); return value.toString(); } else { return "no description of return"; } }
static String getDescriptionFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("description"); return value.toString(); } else { return "no description"; } }
static Object getRequestPath(Annotated classMeta, final String name) { final AnnotationData requestMapping = getAnnotationData(classMeta); if (requestMapping != null) { Object value = requestMapping.getValues().get("value"); if (value == null) { value = "/" + name.toLowerCase(); } return value; } else { return "/" + name.toLowerCase(); } }
static Object getRequestPath(Annotated classMeta, final String name) { final AnnotationData requestMapping = getAnnotationData(classMeta); if (requestMapping != null) { Object value = requestMapping.getValues().get("value"); if (value == null) { value = "/" + name.toLowerCase(); } return value; } else { return "/" + name.toLowerCase(); } }
static String getReturnDescriptionFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("returnDescription"); return value.toString(); } else { return "no description of return"; } }
static String getSummaryFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("summary"); return value.toString(); } else { return "no summary"; } }
static int getCodeFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("code"); return Conversions.toInt(value); } else { return -1; } }
static String getContentTypeFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("contentType"); return Conversions.toString(value); } else { return "application/json"; } }
static int getCodeFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("code"); return Conversions.toInt(value); } else { return -1; } }
static String getContentTypeFromRequestMapping(Annotated annotated) { final AnnotationData requestMapping = getAnnotationData(annotated); if (requestMapping != null) { Object value = requestMapping.getValues().get("contentType"); return Conversions.toString(value); } else { return "application/json"; } }