Templator
constructor(template: String = "", context: Map<String, Any?> = emptyMap(), regexLabel: Regex = DEFAULT_REGEX_LABEL, regexReplace: Regex = DEFAULT_REGEX_REPLACE)
Parameters
template
шаблон
context
данные для шаблона
regexLabel
регулярка описывающая строки-подстановки
regexReplace
регулярка, определяющая заменяемую часть подстановки
Тесты: site.geniyz.str.TemplatorTest (simpleTest, customRegex, valueWithSpecialReplacementCharacters, insertedValueIsNotRenderedRecursively, repeatedPlaceholder, objectProperties, booleanIsGetter, missingValueIsEmpty)
constructor(template: Path? = null, context: Map<String, Any?> = emptyMap(), regexLabel: Regex = DEFAULT_REGEX_LABEL, regexReplace: Regex = DEFAULT_REGEX_REPLACE)
Альтернативный конструктор: шаблон читается из текстового файла template.
Если template равно null, шаблон считается пустым.
Parameters
template
путь к файлу с шаблоном
context
данные для шаблона
regexLabel
регулярка описывающая строки-подстановки
regexReplace
регулярка, определяющая заменяемую часть подстановки