Uses of Class
org.klojang.templates.Template
Packages that use Template
-
Uses of Template in org.klojang.templates
Methods in org.klojang.templates that return TemplateModifier and TypeMethodDescriptionstatic Template
Parses the specified file into aTemplate
.static Template
Template.fromResolver
(PathResolver resolver, String path) Creates aTemplate
from the source provided by the specifiedPathResolver
.static Template
Template.fromResource
(Class<?> clazz, String path) Parses the specified resource into aTemplate
.static Template
Template.fromString
(Class<?> clazz, String source) Parses the specified string into aTemplate
.static Template
Template.fromString
(String source) Parses the specified string into aTemplate
.static Template
TemplateUtils.getContainingTemplate
(Template template, String FQN) Returns the template that directly contains the variable or nested template denoted by the specified fully-qualified name.Template.getNestedTemplate
(String name) Returns the nested template identified by the specified name.static Template
TemplateUtils.getNestedTemplate
(Template template, String FQN) Returns the nested template corresponding to the specified fully-qualified name.Template.getParent()
Returns the template inside which thisTemplate
is nested.Template.getRootTemplate()
Returns the root template of this (nested)Template
.RenderSession.getTemplate()
Returns the template being populated by thisRenderSession
.Methods in org.klojang.templates that return types with arguments of type TemplateModifier and TypeMethodDescriptionTemplateUtils.getAllVariables
(Template template) Returns the names of all variables in the specified template and all templates descending from the specified template.Template.getNestedTemplates()
Returns all templates nested inside thisTemplate
(non-recursive).TemplateUtils.getTemplateHierarchy
(Template template) Returns the specified template and all templates descending from it.Methods in org.klojang.templates with parameters of type TemplateModifier and TypeMethodDescriptionStringifierRegistry.Builder.forTemplate
(Template root, String nestedTemplateName, Stringifier stringifier, String... varNames) Assigns the specified stringifier to one or more variables in a nested template.TemplateUtils.getAllVariableFQNames
(Template template) Returns the fully-qualified names of all variables in the specified template and all templates descending from the specified template.TemplateUtils.getAllVariableFQNames
(Template template, boolean relative) Returns the fully-qualified names of all variables in the specified template and all templates descending from the specified template.static List
<VariableOccurrence> TemplateUtils.getAllVariableOccurrences
(Template template) Returns a depth-first view of all variable occurrences within the specified template.TemplateUtils.getAllVariables
(Template template) Returns the names of all variables in the specified template and all templates descending from the specified template.static Template
TemplateUtils.getContainingTemplate
(Template template, String FQN) Returns the template that directly contains the variable or nested template denoted by the specified fully-qualified name.static String
Returns the fully-qualified name of the specified template, relative to the root template.static String
Returns the fully-qualified name of the specified name.static Template
TemplateUtils.getNestedTemplate
(Template template, String FQN) Returns the nested template corresponding to the specified fully-qualified name.TemplateUtils.getTemplateHierarchy
(Template template) Returns the specified template and all templates descending from it.static void
TemplateUtils.printParts
(Template template) Prints out the constituent parts of the specifiedTemplate
.static void
TemplateUtils.printParts
(Template template, PrintStream out) Prints out the constituent parts of the specifiedTemplate
.AccessorRegistry.Builder.register
(BeanReader<T> beanReader, Template template) Use the specifiedBeanReader
to access objects of the type theBeanReader
can read.AccessorRegistry.Builder.register
(BeanReader<T> beanReader, Template template, NameMapper nameMapper) Use the specifiedBeanReader
to access objects of the type theBeanReader
can read.Sets theAccessor
to be used for objects of the specified type, when inserted into the specified template.StringifierRegistry.Builder.register
(Template template, Stringifier stringifier, String... varNames) Assigns the specified stringifier to one or more variables in the specified template.AccessorRegistry.Builder.setNameMapper
(Template template, NameMapper nameMapper) Sets theNameMapper
to be used for the specified template.Explicitly sets the data type of the specified variables.