RendererRegistry (Grails 3.2.7)
Date: 2017-03-06

Package: grails.rest.render

## [Groovy] Interface RendererRegistry

- Authors:
    Graeme Rocher
  Since:
    2.3

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `addContainerRenderer(java.lang.Class objectType, Renderer renderer)` Adds a container renderer
    `void` | `addDefaultRenderer(Renderer<java.lang.Object> renderer)` Adds a default renderer, which are fall backs if the type is not known
    `void` | `addRenderer(Renderer<T> renderer)` Adds a new renderer
    `Renderer<C>` | `findContainerRenderer(MimeType contentType, java.lang.Class<C> containerType, T object)` Finds a renderer for a container (List, Errors, Map etc.) for another object
    `Renderer<T>` | `findRenderer(MimeType contentType, T object)` Finds a renderer
    `boolean` | `isContainerType(java.lang.Class<?> aClass)` Whether the specified class is a container (list, map etc.)

- - ### Method Detail

    - #### void addContainerRenderer(java.lang.Class objectType, Renderer renderer)

      Adds a container renderer

      Parameters:
        `objectType` - The object type
        `renderer` - The renderer

    - #### void addDefaultRenderer(Renderer<java.lang.Object> renderer)

      Adds a default renderer, which are fall backs if the type is not known

      Parameters:
        `renderer` - The renderer to add

    - #### void addRenderer(Renderer<T> renderer)

      Adds a new renderer

      Parameters:
        `renderer` - The renderer to add

    - #### Renderer<C> findContainerRenderer(MimeType contentType, java.lang.Class<C> containerType, T object)

      Finds a renderer for a container (List, Errors, Map etc.) for another object

      Parameters:
        `contentType` - The content type
        `containerType` - The container type
        `object` - The object to render, an instance of the container (list, map etc.)
      Returns:
        A renderer or null if non exists

    - #### Renderer<T> findRenderer(MimeType contentType, T object)

      Finds a renderer

      Parameters:
        `contentType` - The content type
        `object` - The object
      Returns:
        The renderer

    - #### boolean isContainerType(java.lang.Class<?> aClass)

      Whether the specified class is a container (list, map etc.)

      Parameters:
        `aClass` - The class
      Returns:
        True if it is