/* package */List<Response> buildResponse(MethodMetadata metadata) { if (metadata == null) { return null; } Response r = null; // Set<MediaType> produces = metadata.getProduces(); Set<Representation> representations = buildOutgoingRepresentation(metadata, null); if (representations != null && !representations.isEmpty()) { r = new Response(); r.getRepresentation().addAll(representations); } java.lang.reflect.Method m = metadata.getReflectionMethod(); if (Void.TYPE.equals(m.getReturnType())) { if (r == null) { r = new Response(); } r.getStatus().add(Long.valueOf(204)); } else if (!javax.ws.rs.core.Response.class.isAssignableFrom(m.getReturnType())) { if (r == null) { r = new Response(); } r.getStatus().add(Long.valueOf(200)); } return Collections.singletonList(r); }
try { SearchResult searchResult = context.getAttribute(SearchResult.class); javaMethod = searchResult.getMethod().getMetadata().getReflectionMethod(); parameters = searchResult.getInvocationParameters(); instance = searchResult.getResource().getInstance(context);
.getName(), prettyMethodPrint(resMethodData.get(i).getReflectionMethod())); if (logger.isTraceEnabled()) { LogUtilities
Method method = methodMetadata.getReflectionMethod(); if (Void.TYPE.equals(method.getReturnType())) { if (produces.size() > 0 && methodMetadata.getProduces().equals(produces)) {
/* package */Method buildMethod(ClassMetadata classMetadata, MethodMetadata metadata) { Method m = new Method(); m.setName(metadata.getHttpMethod()); java.lang.reflect.Method reflMethod = metadata.getReflectionMethod(); if (reflMethod != null) { WADLDoc d = reflMethod.getAnnotation(WADLDoc.class); if (d != null) { m.getDoc().add(getDocument(d)); } } Request r = buildRequest(classMetadata, metadata); if (r != null) { m.setRequest(r); } List<Response> resp = buildResponse(metadata); if (resp != null) { m.getResponse().addAll(resp); } return m; }
SearchResult searchResult = context.getAttribute(SearchResult.class); if (searchResult != null && searchResult.isFound()) { Method reflectionMethod = searchResult.getMethod().getMetadata().getReflectionMethod(); genericType = reflectionMethod.getGenericReturnType(); declaredAnnotations = reflectionMethod.getDeclaredAnnotations();
constructMethodString(methodMetadata.getReflectionMethod()); String produces = constructMediaTypeString(method.getProduces()); String methodName = constructMethodString(method.getReflectionMethod());
java.lang.reflect.Method reflMethod = methodMeta.getReflectionMethod(); if (reflMethod != null) { WADLDoc d = reflMethod.getAnnotation(WADLDoc.class);