Class GroovyRendererSupport<T>

  • Type Parameters:
    T - The type of object this renderer renders
    All Implemented Interfaces:
    ratpack.render.Renderer<T>

    public abstract class GroovyRendererSupport<T>
    extends ratpack.render.RendererSupport<T>
    A specialisation of RendererSupport that makes a GroovyContext available.
    • Constructor Detail

      • GroovyRendererSupport

        public GroovyRendererSupport()
    • Method Detail

      • render

        public final void render​(ratpack.handling.Context ctx,
                                 T object)
                          throws java.lang.Exception
        Delegates to render(GroovyContext, Object), wrapping the given context in a GroovyContext.
        Specified by:
        render in interface ratpack.render.Renderer<T>
        Specified by:
        render in class ratpack.render.RendererSupport<T>
        Parameters:
        ctx - The context
        object - The object to render
        Throws:
        java.lang.Exception - the exception thrown by render(GroovyContext, Object) if any
      • render

        public abstract void render​(GroovyContext context,
                                    T object)
                             throws java.lang.Exception
        Renders the given object to the context.
        Parameters:
        context - The context to render to
        object - The object to render
        Throws:
        java.lang.Exception - If the object cannot be rendered for any reason
        See Also:
        Renderer.render(ratpack.handling.Context, Object)