Interface StringRenderable

All Known Subinterfaces:
HtmlRenderable, PlainTextRenderable
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StringRenderable
The role of an object that can be rendered into a String as HTML markup.
Author:
Fabrizio Giudici
Stereotype:
Role
  • Field Details

  • Method Details

    • render

      @Nonnull String render(@Nonnull Object... args)
      Renders the attached object into a String. The method accepts optional parameters that can be used to control the format of the rendering; they are usually specific of the object attached to this role.
      Parameters:
      args - optional rendering parameters
      Returns:
      the string
    • renderTo

      default void renderTo(@Nonnull StringBuilder stringBuilder, @Nonnull Object... args)
      Renders the attached object appending to a StringBuilder. The method accepts optional parameters that can be used to control the format of the rendering; they are usually specific of the object attached to this role.
      Parameters:
      stringBuilder - the StringBuilder to append to
      args - optional rendering parameters
    • renderTo

      default void renderTo(@Nonnull PrintWriter printWriter, @Nonnull Object... args)
      Renders the attached object printing to a PrintWriter. The method accepts optional parameters that can be used to control the format of the rendering; they are usually specific of the object attached to this role.
      Parameters:
      printWriter - the PrintWriter to print to
      args - optional rendering parameters