Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## grails.rest.render
[Groovy] Interface RendererRegistry

    interface RendererRegistry

Authors:
  Graeme Rocher

Since:
  2.3

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

Method Detail

### addContainerRenderer

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

  Adds a container renderer
  Parameters:
    `objectType` - The object type
    `renderer` - The renderer

### addDefaultRenderer

    void addDefaultRenderer(Renderer renderer)

  Adds a default renderer, which are fall backs if the type is not known
  Parameters:
    `renderer` - The renderer to add

### addRenderer

    void addRenderer(Renderer renderer)

  Adds a new renderer
  Parameters:
    `renderer` - The renderer to add

### findContainerRenderer

    Renderer findContainerRenderer(MimeType contentType, java.lang.Class containerType, java.lang.Object 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

### findRenderer

    Renderer findRenderer(MimeType contentType, java.lang.Object object)

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

### isContainerType

    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

Groovy Documentation