public com.yahoo.processing.rendering.Renderer<Result> getRenderer(ComponentSpecification format) {
        if (format == null || format.stringValue().equals("default")) return getDefaultRenderer();
        if (format.stringValue().equals("json")) return getComponent(jsonRendererId);
        if (format.stringValue().equals("xml")) return getComponent(xmlRendererId);
        if (format.stringValue().equals("page")) return getComponent(pageRendererId);
        if (format.stringValue().equals("sse")) return getComponent(eventRendererId);

        com.yahoo.processing.rendering.Renderer<Result> renderer = getComponent(format);
        if (renderer == null)
            throw new IllegalInputException("No renderer with id or alias '" + format + "'. " +
                                            "Available renderers are: [" + rendererNames() + "].");
        return renderer;
    }
Returns the requested renderer.

@param format the id or format alias of the renderer to return. If null is passed the default renderer
              is returned
@throws IllegalArgumentException if the renderer cannot be resolved
container-search/src/main/java/com/yahoo/search/rendering/RendererRegistry.java