private static String getParamName(Annotation queryParam) { for (Class<? extends Annotation> annotationClass : PARAM_ANNOTATION_CLASSES) { String paramName = AnnotationUtils.getValueOrNull(annotationClass, queryParam); if (paramName != null) { return paramName; } } // This is not one of the annotations in PARAM_ANNOTATION_CLASSES. return null; }
public static RestMethodMetadata create(Method method, String baseUrl, String intfacePath) { String methodName = method.getName(); Map<Class<? extends Annotation>, Annotation> methodAnnotationMap = AnnotationUtils.getMethodAnnotationMap(method, RestInvocation.PARAM_ANNOTATION_CLASSES); Annotation[][] parameterAnnotations = method.getParameterAnnotations(); Consumes consumes = AnnotationUtils.getFromMethodOrClass(method, Consumes.class); String reqContentType = consumes != null ? consumes.value()[0] : null; Produces produces = AnnotationUtils.getFromMethodOrClass(method, Produces.class); String resContentType = produces != null ? produces.value()[0] : null; Path pathAnn = method.getAnnotation(Path.class);
public static RestMethodMetadata create(Method method, String baseUrl, String intfacePath) { String methodName = method.getName(); Map<Class<? extends Annotation>, Annotation> methodAnnotationMap = AnnotationUtils.getMethodAnnotationMap(method, RestInvocation.PARAM_ANNOTATION_CLASSES); Annotation[][] parameterAnnotations = method.getParameterAnnotations(); Consumes consumes = AnnotationUtils.getFromMethodOrClass(method, Consumes.class); String reqContentType = consumes != null ? consumes.value()[0] : null; Produces produces = AnnotationUtils.getFromMethodOrClass(method, Produces.class); String resContentType = produces != null ? produces.value()[0] : null; Path pathAnn = method.getAnnotation(Path.class);
private static String getParamName(Annotation queryParam) { for (Class<? extends Annotation> annotationClass : PARAM_ANNOTATION_CLASSES) { String paramName = AnnotationUtils.getValueOrNull(annotationClass, queryParam); if (paramName != null) { return paramName; } } // This is not one of the annotations in PARAM_ANNOTATION_CLASSES. return null; }