Module io.jstach.jstachio
Package io.jstach.jstachio.spi
Interface JStachioTemplateFinder.SimpleTemplateFinder
- All Superinterfaces:
 JStachioExtension,JStachioTemplateFinder
- All Known Subinterfaces:
 TemplateProvider.GeneratedTemplateProvider
- Enclosing interface:
 - JStachioTemplateFinder
 
An easier to implement template finder based on a sequence of templates.
- Author:
 - agentgt
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.jstachio.spi.JStachioTemplateFinder
JStachioTemplateFinder.SimpleTemplateFinder - 
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable TemplateInfofindOrNull(Class<?> modelType) Finds a template or null if no template is found.default TemplateInfofindTemplate(Class<?> modelType) Finds aTemplateif possible otherwise possibly falling back to aTemplateInfobased on annotation metadata or some other mechanism.default booleansupportsType(Class<?> modelType) Determines if this template finder has a template for the model type (the class annotated by JStache).Iterable<? extends TemplateInfo>Sequence of templates used to find matching template from model.Methods inherited from interface io.jstach.jstachio.spi.JStachioTemplateFinder
order 
- 
Method Details
- 
findTemplate
Description copied from interface:JStachioTemplateFinderFinds aTemplateif possible otherwise possibly falling back to aTemplateInfobased on annotation metadata or some other mechanism.- Specified by:
 findTemplatein interfaceJStachioTemplateFinder- Parameters:
 modelType- the models class (the one annotated withJStacheand not the Templates class)- Returns:
 - the template info which might be a 
Templateif the generated template was found. - Throws:
 Exception- if any reflection or runtime error happensNoSuchElementException- if the template is not found and there were no other errorsNullPointerException- if the modelType is null
 - 
supportsType
Description copied from interface:JStachioTemplateFinderDetermines if this template finder has a template for the model type (the class annotated by JStache).- Specified by:
 supportsTypein interfaceJStachioTemplateFinder- Parameters:
 modelType- the models class (the one annotated withJStacheand not the Templates class)- Returns:
 - true if this finder has template for modelType
 
 - 
findOrNull
Description copied from interface:JStachioTemplateFinderFinds a template or null if no template is found. Should not throw an exception if a template is not found.- Specified by:
 findOrNullin interfaceJStachioTemplateFinder- Parameters:
 modelType- the models class (the one annotated withJStacheand not the Templates class)- Returns:
 nullif the template is was not found or the template info which might be aTemplateif the generated template was found.- See Also:
 
 - 
templates
Iterable<? extends TemplateInfo> templates()Sequence of templates used to find matching template from model.- Returns:
 - templates
 
 
 -