java.lang.Object
io.helidon.pico.tools.TemplateHelper
Helper tools for dealing with Pico-related Handlebar templates.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionapplySubstitutions(CharSequence target, Map<String, Object> props, boolean logErr) Apply substitutions.static TemplateHelpercreate()Creates a template helper utility using the global bootstrap configuration.generatedStickerFor(String generatorClassTypeName) Produces the generated sticker annotation attribute contents.loadTemplate(String templateName, String name) Same assafeLoadTemplate(String, String)but will return null if the template name is not found.requiredArguments(String target) Determine the arguments needed for template evaluation.
-
Field Details
-
TAG_TEMPLATE_NAME
The tag that us used to represent the template name to use.- See Also:
-
DEFAULT_TEMPLATE_NAME
The default template name to use.- See Also:
-
-
Method Details
-
create
Creates a template helper utility using the global bootstrap configuration.- Returns:
- the template helper initialized with the bootstrap configuration
-
generatedStickerFor
Produces the generated sticker annotation attribute contents.- Parameters:
generatorClassTypeName- the generator class type name- Returns:
- the generated sticker
-
applySubstitutions
Apply substitutions.- Parameters:
target- the target string to find substitutions forprops- the replacementslogErr- flag indicating whether logger should be written for errors and warnings- Returns:
- the new string, fully resolved with substitutions
-
requiredArguments
Determine the arguments needed for template evaluation.- Parameters:
target- the target template- Returns:
- the set of attributes that are required for substitution
-
loadTemplate
Same assafeLoadTemplate(String, String)but will return null if the template name is not found.- Parameters:
templateName- the template profile/directoryname- the template name to use- Returns:
- the template, or null if not found
-