Interface SafeMustacheTemplate


public interface SafeMustacheTemplate
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    substitute(Writer out, Object params)
    Substitutes param values safely and writes the result to the out writer.
    void
    substitute(Writer out, Object defaultObj, Object params)
    Substitutes param values safely and writes the result to the out writer.
  • Method Details

    • substitute

      void substitute(Writer out, Object params)
      Substitutes param values safely and writes the result to the out writer.

      Param methods have to be annotated with InputSubstitutionSafe otherwise they wont be substituted.

      Parameters:
      out - the writer for the output
      params - scope parameters to be substituted
    • substitute

      void substitute(Writer out, Object defaultObj, Object params)
      Substitutes param values safely and writes the result to the out writer. Also has a default object to check values for

      Param methods have to be annotated with InputSubstitutionSafe otherwise they wont be substituted.

      Parameters:
      out - the writer for the output
      defaultObj - the object ot try resolve values against if params can't be found.
      params - scope parameters to be substituted
    • getTemplate

      String getTemplate()
      Returns:
      the original template used to render