code: private ResolvedViewable resolve(final Viewable viewable,
                                       final List<MediaType> mediaTypes,
                                       final Class<?> resolvingClass,
                                       final ViewableContext viewableContext,
                                       final Set<TemplateProcessor> templateProcessors) {
          for (TemplateProcessor templateProcessor : templateProcessors) {
              for (final MediaType mediaType : mediaTypes) {
                  final ResolvedViewable resolvedViewable = viewableContext
                          .resolveViewable(viewable, mediaType, resolvingClass, templateProcessor);
  
                  if (resolvedViewable != null) {
                      return resolvedViewable;
                  }
              }
          }
  
          return null;
      }
docs: Resolve given {@link org.glassfish.jersey.server.mvc.Viewable viewable}
  for a list of {@link javax.ws.rs.core.MediaType mediaTypes} and a {@link Class resolvingClass}
  using given {@link org.glassfish.jersey.server.mvc.spi.ViewableContext viewableContext}
  and a set of {@link org.glassfish.jersey.server.mvc.spi.TemplateProcessor templateProcessors}
  
  @param viewable           viewable to be resolved.
  @param mediaTypes         producible media types.
  @param resolvingClass     non-null resolving class.
  @param viewableContext    viewable context.
  @param templateProcessors collection of available template processors.
  @return resolved viewable or {@code null}, if the viewable cannot be resolved.