Interface Formatter.Formattable

All Known Subinterfaces:
ContextNode
All Known Implementing Classes:
ObjectContext
Enclosing interface:
Formatter

public static interface Formatter.Formattable
Implement to allow formatting of custom objects you want to output. This is often easier than registering custom JStacheFormatterTypes but couples model objects to JStachio.
  • Method Summary

    Modifier and Type
    Method
    Description
    <A extends Output<E>, E extends Exception>
    void
    format(Formatter formatter, Appender downstream, String path, A a)
    Called by the formatter to format.
  • Method Details

    • format

      <A extends Output<E>, E extends Exception> void format(Formatter formatter, Appender downstream, String path, A a) throws E
      Called by the formatter to format. Implementations can decide if they want to use the passed in formatter to perhaps format other types.
      Type Parameters:
      A - the appendable type
      E - the appender exception type
      Parameters:
      formatter - the calling formatter
      downstream - the downstream appender to be used instead of the appendable directly.
      path - the dotted mustache like path
      a - the appendable to be passed to the appender
      Throws:
      E - if the appender or appendable throws an exception