TemplateProcessor
A builder-like processor for a template engine backed by JTE (Java Template Engine) with .jte templates.
Three main features:
Values: replace a placeholder in the template with a value. In JTE templates, values are referenced via
${NAME}.Conditionals: show or hide fragments of the template code. In JTE templates, conditionals are expressed via
@if(NAME)...@endif. An inverted (not) conditional is expressed via@if(!NAME)...@endif.Iterables: repeat the content in their fragment as many times as the iterable's size, while replacing the placeholder with the current item during each iteration. In JTE templates, iterables are expressed via
@for(item in NAME)${item}@endfor.
Parameters
text or code of the .jte template
Constructors
Functions
Adds a conditional variable that shows or removes fragments of the template code.
Creates a copy of this template processor with the same injected properties.
Adds both a value to replace the placeholder (or null if absent), and registers it so that the template can check for null presence.