Interface TemplatePart

All Known Implementing Classes:
TextTemplatePart, VariableTemplatePart

public interface TemplatePart
A fragment of the template as segregated by the parser.
  • Method Details

    • render

      String render(Map<String,Function<Parameter,String>> bindings)
      Renders the template part using the bindings as necessary.
      Parameters:
      bindings - the binding to map parameters with.
      Returns:
      the rendered string.
    • extract

      String extract(Map<String,String> captureGroup)
      Extracts the original template string from the rendered text.
      Parameters:
      captureGroup - the capture group to use for extraction.
      Returns:
      the original string for this template.