org.apache.tiles.request.render

## Class BasicRendererFactory

- java.lang.Object
- - org.apache.tiles.request.render.BasicRendererFactory

- All Implemented Interfaces:
    RendererFactory

      public class BasicRendererFactory
      extends Object
      implements RendererFactory

  Basic renderer factory implementation.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Renderer` | `defaultRenderer` The default renderer.
    `protected Map<String,Renderer>` | `renderers` The renderer name/renderer map.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicRendererFactory()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Renderer` | `getRenderer(String name)` Returns a renderer by its name.
    `void` | `registerRenderer(String name, Renderer renderer)` Registers a renderer.
    `void` | `setDefaultRenderer(Renderer renderer)` Sets the default renderer.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### renderers

          protected Map<String,Renderer> renderers

      The renderer name/renderer map.

    - #### defaultRenderer

          protected Renderer defaultRenderer

      The default renderer.

  - ### Constructor Detail

    - #### BasicRendererFactory

          public BasicRendererFactory()

      Constructor.

  - ### Method Detail

    - #### getRenderer

          public Renderer getRenderer(String name)

      Returns a renderer by its name.
      Specified by:
        `getRenderer` in interface `RendererFactory`
      Parameters:
        `name` - The name of the renderer.
      Returns:
        The renderer.

    - #### setDefaultRenderer

          public void setDefaultRenderer(Renderer renderer)

      Sets the default renderer.
      Parameters:
        `renderer` - The default renderer.

    - #### registerRenderer

          public void registerRenderer(String name,
                                       Renderer renderer)

      Registers a renderer.
      Parameters:
        `name` - The name of the renderer.
        `renderer` - The renderer to register.

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.