Type unwrappedType = ((ParameterizedType)method.getGenericReturnType()).getActualTypeArguments()[0]; Type newType = adaptGenericType(unwrappedType);
MediaType type = method.resolveContentType(request, entity); BuiltResponse jaxrsResponse = (BuiltResponse)Response.ok(entity, type).build(); jaxrsResponse.setGenericType(method.getGenericReturnType()); jaxrsResponse.addMethodAnnotations(method.getMethodAnnotations()); response = jaxrsResponse;
if (generic == null) if (method != null && !Response.class.isAssignableFrom(method.getMethod().getReturnType())) generic = method.getGenericReturnType(); else generic = type;
Type unwrappedType = ((ParameterizedType)method.getGenericReturnType()).getActualTypeArguments()[0]; Type newType = adaptGenericType(unwrappedType);
Type unwrappedType = ((ParameterizedType)method.getGenericReturnType()).getActualTypeArguments()[0]; Type newType = adaptGenericType(unwrappedType);
MediaType type = method.resolveContentType(request, entity); BuiltResponse jaxrsResponse = (BuiltResponse)Response.ok(entity, type).build(); jaxrsResponse.setGenericType(method.getGenericReturnType()); jaxrsResponse.addMethodAnnotations(method.getMethodAnnotations()); response = jaxrsResponse;
MediaType type = method.resolveContentType(request, entity); BuiltResponse jaxrsResponse = (BuiltResponse)Response.ok(entity, type).build(); jaxrsResponse.setGenericType(method.getGenericReturnType()); jaxrsResponse.addMethodAnnotations(method.getMethodAnnotations()); response = jaxrsResponse;
if (generic == null) if (method != null && !Response.class.isAssignableFrom(method.getMethod().getReturnType())) generic = method.getGenericReturnType(); else generic = type;
if (generic == null) if (method != null && !Response.class.isAssignableFrom(method.getMethod().getReturnType())) generic = method.getGenericReturnType(); else generic = type;