private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { final Invocable invocable = candidate.methodRouting.method.getInvocable(); final Class<?> responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); if (Response.class.isAssignableFrom(responseType) || Void.class.isAssignableFrom(responseType)) { return true; } final Type genericType = invocable.getRoutingResponseType(); final Type genericReturnType = genericType instanceof GenericType ? ((GenericType) genericType).getType() : genericType; for (final WriterModel model : workers.getWritersModelsForType(responseType)) { if (model.isWriteable( responseType, genericReturnType, invocable.getHandlingMethod().getDeclaredAnnotations(), candidate.produces.combinedType)) { return true; } } return false; }
private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { final Invocable invocable = candidate.methodRouting.method.getInvocable(); final Class<?> responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); if (Response.class.isAssignableFrom(responseType) || Void.class.isAssignableFrom(responseType)) { return true; } final Type genericType = invocable.getRoutingResponseType(); final Type genericReturnType = genericType instanceof GenericType ? ((GenericType) genericType).getType() : genericType; for (final WriterModel model : workers.getWritersModelsForType(responseType)) { if (model.isWriteable( responseType, genericReturnType, invocable.getHandlingMethod().getDeclaredAnnotations(), candidate.produces.combinedType)) { return true; } } return false; }
? resourceMethod.getProducedTypes() : Collections.singletonList(MediaType.WILDCARD_TYPE); final List<WriterModel> writersForEntityType = workers.getWritersModelsForType(responseEntityClass);
? resourceMethod.getProducedTypes() : Collections.singletonList(MediaType.WILDCARD_TYPE); final List<WriterModel> writersForEntityType = workers.getWritersModelsForType(responseEntityClass);
private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { final Invocable invocable = candidate.methodRouting.method.getInvocable(); final Class<?> responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); if (Response.class.isAssignableFrom(responseType) || Void.class.isAssignableFrom(responseType)) { return true; } final Type genericType = invocable.getRoutingResponseType(); final Type genericReturnType = genericType instanceof GenericType ? ((GenericType) genericType).getType() : genericType; for (final WriterModel model : workers.getWritersModelsForType(responseType)) { if (model.isWriteable( responseType, genericReturnType, invocable.getHandlingMethod().getDeclaredAnnotations(), candidate.produces.combinedType)) { return true; } } return false; }
? resourceMethod.getProducedTypes() : Collections.singletonList(MediaType.WILDCARD_TYPE); final List<WriterModel> writersForEntityType = workers.getWritersModelsForType(responseEntityClass);
private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { final Invocable invocable = candidate.methodRouting.method.getInvocable(); final Class<?> responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); if (Response.class.isAssignableFrom(responseType) || Void.class.isAssignableFrom(responseType)) { return true; } final Type genericType = invocable.getRoutingResponseType(); final Type genericReturnType = genericType instanceof GenericType ? ((GenericType) genericType).getType() : genericType; for (final WriterModel model : workers.getWritersModelsForType(responseType)) { if (model.isWriteable( responseType, genericReturnType, invocable.getHandlingMethod().getDeclaredAnnotations(), candidate.produces.combinedType)) { return true; } } return false; }
private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { final Invocable invocable = candidate.methodRouting.method.getInvocable(); final Class<?> responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); if (Response.class.isAssignableFrom(responseType) || Void.class.isAssignableFrom(responseType)) { return true; } final Type genericType = invocable.getRoutingResponseType(); final Type genericReturnType = genericType instanceof GenericType ? ((GenericType) genericType).getType() : genericType; for (final WriterModel model : workers.getWritersModelsForType(responseType)) { if (model.isWriteable( responseType, genericReturnType, invocable.getHandlingMethod().getDeclaredAnnotations(), candidate.produces.combinedType)) { return true; } } return false; }
private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { final Invocable invocable = candidate.methodRouting.method.getInvocable(); final Class<?> responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); if (Response.class.isAssignableFrom(responseType) || Void.class.isAssignableFrom(responseType)) { return true; } final Type genericType = invocable.getRoutingResponseType(); final Type genericReturnType = genericType instanceof GenericType ? ((GenericType) genericType).getType() : genericType; for (final WriterModel model : workers.getWritersModelsForType(responseType)) { if (model.isWriteable( responseType, genericReturnType, invocable.getHandlingMethod().getDeclaredAnnotations(), candidate.produces.combinedType)) { return true; } } return false; }
private boolean isWriteable(final RequestSpecificConsumesProducesAcceptor candidate) { final Invocable invocable = candidate.methodRouting.method.getInvocable(); final Class<?> responseType = Primitives.wrap(invocable.getRawRoutingResponseType()); if (Response.class.isAssignableFrom(responseType) || Void.class.isAssignableFrom(responseType)) { return true; } final Type genericType = invocable.getRoutingResponseType(); final Type genericReturnType = genericType instanceof GenericType ? ((GenericType) genericType).getType() : genericType; for (final WriterModel model : workers.getWritersModelsForType(responseType)) { if (model.isWriteable( responseType, genericReturnType, invocable.getHandlingMethod().getDeclaredAnnotations(), candidate.produces.combinedType)) { return true; } } return false; }
? resourceMethod.getProducedTypes() : Collections.singletonList(MediaType.WILDCARD_TYPE); final List<WriterModel> writersForEntityType = workers.getWritersModelsForType(responseEntityClass);
? resourceMethod.getProducedTypes() : Lists.newArrayList(MediaType.WILDCARD_TYPE); final List<WriterModel> writersForEntityType = workers.getWritersModelsForType(responseEntityClass);
? resourceMethod.getProducedTypes() : Lists.newArrayList(MediaType.WILDCARD_TYPE); final List<WriterModel> writersForEntityType = workers.getWritersModelsForType(responseEntityClass);
? resourceMethod.getProducedTypes() : Lists.newArrayList(MediaType.WILDCARD_TYPE); final List<WriterModel> writersForEntityType = workers.getWritersModelsForType(responseEntityClass);